+++ /dev/null
-From: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
-Subject: LTTng instrumentation - net
-
-Original patch header:
- LTTng instrumentation - net
-
- Network device activity instrumentation (xmit/receive). Allows to detect when a
- packet had arrived on the network card or when it is going to be sent. This is
- the instrumentation point outside of the drivers that is the closest to the
- hardware. It allows to detect the amount of time taken by a packet to go through
- the kernel between the system call and the actual delivery to the network card
- (given that system calls are instrumented).
-
- 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: Andrew Morton <akpm@linux-foundation.org>
- CC: netdev@vger.kernel.org
- CC: Jeff Garzik <jgarzik@pobox.com>
- 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>
-
-Acked-by: Jan Blunck <jblunck@suse.de>
----
----
- include/trace/net.h | 14 ++++++++++++++
- net/core/dev.c | 3 +++
- 2 files changed, 17 insertions(+)
-
---- /dev/null
-+++ b/include/trace/net.h
-@@ -0,0 +1,14 @@
-+#ifndef _TRACE_NET_H
-+#define _TRACE_NET_H
-+
-+#include <net/sock.h>
-+#include <linux/tracepoint.h>
-+
-+DEFINE_TRACE(net_dev_xmit,
-+ TPPROTO(struct sk_buff *skb),
-+ TPARGS(skb));
-+DEFINE_TRACE(net_dev_receive,
-+ TPPROTO(struct sk_buff *skb),
-+ TPARGS(skb));
-+
-+#endif
---- a/net/core/dev.c
-+++ b/net/core/dev.c
-@@ -127,6 +127,7 @@
- #include <linux/in.h>
- #include <linux/jhash.h>
- #include <linux/random.h>
-+#include <trace/net.h>
-
- #include "net-sysfs.h"
-
-@@ -1794,6 +1795,7 @@ int dev_queue_xmit(struct sk_buff *skb)
- }
-
- gso:
-+ trace_net_dev_xmit(skb);
- /* Disable soft irqs for various locks below. Also
- * stops preemption for RCU.
- */
-@@ -2215,6 +2217,7 @@ int netif_receive_skb(struct sk_buff *sk
-
- __get_cpu_var(netdev_rx_stat).total++;
-
-+ trace_net_dev_receive(skb);
- skb_reset_network_header(skb);
- skb_reset_transport_header(skb);
- skb->mac_len = skb->network_header - skb->mac_header;