]>
Commit | Line | Data |
---|---|---|
00e5a55c BS |
1 | From: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca> |
2 | Subject: LTTng instrumentation - ipv6 | |
3 | ||
4 | Original patch header: | |
5 | LTTng instrumentation - ipv6 | |
6 | ||
7 | Instrument addr_add and del of network interfaces. Lets a tracer know the | |
8 | interface address changes. | |
9 | ||
10 | Those tracepoints are used by LTTng. | |
11 | ||
12 | About the performance impact of tracepoints (which is comparable to markers), | |
13 | even without immediate values optimizations, tests done by Hideo Aoki on ia64 | |
14 | show no regression. His test case was using hackbench on a kernel where | |
15 | scheduler instrumentation (about 5 events in code scheduler code) was added. | |
16 | See the "Tracepoints" patch header for performance result detail. | |
17 | ||
18 | Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca> | |
19 | CC: Pekka Savola <pekkas@netcore.fi> | |
20 | CC: netdev@vger.kernel.org | |
21 | CC: David S. Miller <davem@davemloft.net> | |
22 | CC: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru> | |
23 | CC: Masami Hiramatsu <mhiramat@redhat.com> | |
24 | CC: 'Peter Zijlstra' <peterz@infradead.org> | |
25 | CC: "Frank Ch. Eigler" <fche@redhat.com> | |
26 | CC: 'Ingo Molnar' <mingo@elte.hu> | |
27 | CC: 'Hideo AOKI' <haoki@redhat.com> | |
28 | CC: Takashi Nishiie <t-nishiie@np.css.fujitsu.com> | |
29 | CC: 'Steven Rostedt' <rostedt@goodmis.org> | |
30 | CC: Eduard - Gabriel Munteanu <eduard.munteanu@linux360.ro> | |
31 | ||
32 | Acked-by: Jan Blunck <jblunck@suse.de> | |
33 | --- | |
34 | --- | |
35 | include/trace/ipv6.h | 14 ++++++++++++++ | |
36 | net/ipv6/addrconf.c | 4 ++++ | |
37 | 2 files changed, 18 insertions(+) | |
38 | ||
39 | --- /dev/null | |
40 | +++ b/include/trace/ipv6.h | |
41 | @@ -0,0 +1,14 @@ | |
42 | +#ifndef _TRACE_IPV6_H | |
43 | +#define _TRACE_IPV6_H | |
44 | + | |
45 | +#include <net/if_inet6.h> | |
46 | +#include <linux/tracepoint.h> | |
47 | + | |
48 | +DEFINE_TRACE(ipv6_addr_add, | |
49 | + TPPROTO(struct inet6_ifaddr *ifa), | |
50 | + TPARGS(ifa)); | |
51 | +DEFINE_TRACE(ipv6_addr_del, | |
52 | + TPPROTO(struct inet6_ifaddr *ifa), | |
53 | + TPARGS(ifa)); | |
54 | + | |
55 | +#endif | |
56 | --- a/net/ipv6/addrconf.c | |
57 | +++ b/net/ipv6/addrconf.c | |
58 | @@ -85,6 +85,7 @@ | |
59 | ||
60 | #include <linux/proc_fs.h> | |
61 | #include <linux/seq_file.h> | |
62 | +#include <trace/ipv6.h> | |
63 | ||
64 | /* Set to 3 to get tracing... */ | |
65 | #define ACONF_DEBUG 2 | |
66 | @@ -653,6 +654,8 @@ ipv6_add_addr(struct inet6_dev *idev, co | |
67 | /* For caller */ | |
68 | in6_ifa_hold(ifa); | |
69 | ||
70 | + trace_ipv6_addr_add(ifa); | |
71 | + | |
72 | /* Add to big hash table */ | |
73 | hash = ipv6_addr_hash(addr); | |
74 | ||
75 | @@ -2167,6 +2170,7 @@ static int inet6_addr_del(struct net *ne | |
76 | in6_ifa_hold(ifp); | |
77 | read_unlock_bh(&idev->lock); | |
78 | ||
79 | + trace_ipv6_addr_del(ifp); | |
80 | ipv6_del_addr(ifp); | |
81 | ||
82 | /* If the last address is deleted administratively, |