diff options
author | Koki Sanagi <sanagi.koki@jp.fujitsu.com> | 2010-08-23 05:46:12 -0400 |
---|---|---|
committer | Frederic Weisbecker <fweisbec@gmail.com> | 2010-09-07 11:51:53 -0400 |
commit | 07dc22e7295f25526f110d704655ff0ea7687420 (patch) | |
tree | 026b83a634d949d80cff48a91ecc38419bba8821 /include/trace | |
parent | cf66ba58b5cb8b1526e9dd2fb96ff8db048d4d44 (diff) |
skb: Add tracepoints to freeing skb
This patch adds tracepoint to consume_skb and add trace_kfree_skb
before __kfree_skb in skb_free_datagram_locked and net_tx_action.
Combinating with tracepoint on dev_hard_start_xmit, we can check
how long it takes to free transmitted packets. And using it, we can
calculate how many packets driver had at that time. It is useful when
a drop of transmitted packet is a problem.
sshd-6828 [000] 112689.258154: consume_skb: skbaddr=f2d99bb8
Signed-off-by: Koki Sanagi <sanagi.koki@jp.fujitsu.com>
Acked-by: David S. Miller <davem@davemloft.net>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Kaneshige Kenji <kaneshige.kenji@jp.fujitsu.com>
Cc: Izumo Taku <izumi.taku@jp.fujitsu.com>
Cc: Kosaki Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Lai Jiangshan <laijs@cn.fujitsu.com>
Cc: Scott Mcmillan <scott.a.mcmillan@intel.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Eric Dumazet <eric.dumazet@gmail.com>
LKML-Reference: <4C724364.50903@jp.fujitsu.com>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Diffstat (limited to 'include/trace')
-rw-r--r-- | include/trace/events/skb.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/include/trace/events/skb.h b/include/trace/events/skb.h index 4b2be6dc76f0..75ce9d500d8e 100644 --- a/include/trace/events/skb.h +++ b/include/trace/events/skb.h | |||
@@ -35,6 +35,23 @@ TRACE_EVENT(kfree_skb, | |||
35 | __entry->skbaddr, __entry->protocol, __entry->location) | 35 | __entry->skbaddr, __entry->protocol, __entry->location) |
36 | ); | 36 | ); |
37 | 37 | ||
38 | TRACE_EVENT(consume_skb, | ||
39 | |||
40 | TP_PROTO(struct sk_buff *skb), | ||
41 | |||
42 | TP_ARGS(skb), | ||
43 | |||
44 | TP_STRUCT__entry( | ||
45 | __field( void *, skbaddr ) | ||
46 | ), | ||
47 | |||
48 | TP_fast_assign( | ||
49 | __entry->skbaddr = skb; | ||
50 | ), | ||
51 | |||
52 | TP_printk("skbaddr=%p", __entry->skbaddr) | ||
53 | ); | ||
54 | |||
38 | TRACE_EVENT(skb_copy_datagram_iovec, | 55 | TRACE_EVENT(skb_copy_datagram_iovec, |
39 | 56 | ||
40 | TP_PROTO(const struct sk_buff *skb, int len), | 57 | TP_PROTO(const struct sk_buff *skb, int len), |