diff options
author | Mathieu Desnoyers <mathieu.desnoyers@efficios.com> | 2011-03-16 19:04:37 -0400 |
---|---|---|
committer | Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca> | 2011-03-16 19:04:37 -0400 |
commit | 241138a75b964d44fdc7360f70ff0810536e57d3 (patch) | |
tree | 060732e1865789d7865b75dcafe64f295a559c0d /net | |
parent | 9a9db3379450ed49fb4fbd232b46ea81dff34f7c (diff) |
lttng-instrumentation/lttng-instrumentation-ipv6
LTTng instrumentation - ipv6
Instrument addr_add and del of network interfaces. Lets a tracer know the
interface address changes.
Those tracepoints are used by LTTng.
About the performance impact of tracepoints (which is comparable to markers),
even without immediate values optimizations, tests done by Hideo Aoki on ia64
show no regression. His test case was using hackbench on a kernel where
scheduler instrumentation (about 5 events in code scheduler code) was added.
See the "Tracepoints" patch header for performance result detail.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
CC: Pekka Savola <pekkas@netcore.fi>
CC: netdev@vger.kernel.org
CC: David S. Miller <davem@davemloft.net>
CC: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
CC: Masami Hiramatsu <mhiramat@redhat.com>
CC: 'Peter Zijlstra' <peterz@infradead.org>
CC: "Frank Ch. Eigler" <fche@redhat.com>
CC: 'Ingo Molnar' <mingo@elte.hu>
CC: 'Hideo AOKI' <haoki@redhat.com>
CC: Takashi Nishiie <t-nishiie@np.css.fujitsu.com>
CC: 'Steven Rostedt' <rostedt@goodmis.org>
CC: Eduard - Gabriel Munteanu <eduard.munteanu@linux360.ro>
Diffstat (limited to 'net')
-rw-r--r-- | net/ipv6/addrconf.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index fd6782e3a03..62c96253c36 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c @@ -87,6 +87,7 @@ #include <linux/proc_fs.h> #include <linux/seq_file.h> +#include <trace/ipv6.h> /* Set to 3 to get tracing... */ #define ACONF_DEBUG 2 @@ -108,6 +109,9 @@ static inline u32 cstamp_delta(unsigned long cstamp) #define ADDRCONF_TIMER_FUZZ (HZ / 4) #define ADDRCONF_TIMER_FUZZ_MAX (HZ) +DEFINE_TRACE(ipv6_addr_add); +DEFINE_TRACE(ipv6_addr_del); + #ifdef CONFIG_SYSCTL static void addrconf_sysctl_register(struct inet6_dev *idev); static void addrconf_sysctl_unregister(struct inet6_dev *idev); @@ -676,6 +680,8 @@ ipv6_add_addr(struct inet6_dev *idev, const struct in6_addr *addr, int pfxlen, /* For caller */ in6_ifa_hold(ifa); + trace_ipv6_addr_add(ifa); + /* Add to big hash table */ hash = ipv6_addr_hash(addr); @@ -2212,6 +2218,7 @@ static int inet6_addr_del(struct net *net, int ifindex, struct in6_addr *pfx, in6_ifa_hold(ifp); read_unlock_bh(&idev->lock); + trace_ipv6_addr_del(ifp); ipv6_del_addr(ifp); /* If the last address is deleted administratively, |