diff options
Diffstat (limited to 'include/trace')
-rw-r--r-- | include/trace/skb.h | 4 | ||||
-rw-r--r-- | include/trace/skb_event_types.h | 38 | ||||
-rw-r--r-- | include/trace/trace_event_types.h | 1 | ||||
-rw-r--r-- | include/trace/trace_events.h | 1 |
4 files changed, 41 insertions, 3 deletions
diff --git a/include/trace/skb.h b/include/trace/skb.h index b66206d9be72..d2de7174a6e8 100644 --- a/include/trace/skb.h +++ b/include/trace/skb.h | |||
@@ -4,8 +4,6 @@ | |||
4 | #include <linux/skbuff.h> | 4 | #include <linux/skbuff.h> |
5 | #include <linux/tracepoint.h> | 5 | #include <linux/tracepoint.h> |
6 | 6 | ||
7 | DECLARE_TRACE(kfree_skb, | 7 | #include <trace/skb_event_types.h> |
8 | TP_PROTO(struct sk_buff *skb, void *location), | ||
9 | TP_ARGS(skb, location)); | ||
10 | 8 | ||
11 | #endif | 9 | #endif |
diff --git a/include/trace/skb_event_types.h b/include/trace/skb_event_types.h new file mode 100644 index 000000000000..4a1c504c0e16 --- /dev/null +++ b/include/trace/skb_event_types.h | |||
@@ -0,0 +1,38 @@ | |||
1 | |||
2 | /* use <trace/skb.h> instead */ | ||
3 | #ifndef TRACE_EVENT | ||
4 | # error Do not include this file directly. | ||
5 | # error Unless you know what you are doing. | ||
6 | #endif | ||
7 | |||
8 | #undef TRACE_SYSTEM | ||
9 | #define TRACE_SYSTEM skb | ||
10 | |||
11 | /* | ||
12 | * Tracepoint for free an sk_buff: | ||
13 | */ | ||
14 | TRACE_EVENT(kfree_skb, | ||
15 | |||
16 | TP_PROTO(struct sk_buff *skb, void *location), | ||
17 | |||
18 | TP_ARGS(skb, location), | ||
19 | |||
20 | TP_STRUCT__entry( | ||
21 | __field( void *, skbaddr ) | ||
22 | __field( unsigned short, protocol ) | ||
23 | __field( void *, location ) | ||
24 | ), | ||
25 | |||
26 | TP_fast_assign( | ||
27 | __entry->skbaddr = skb; | ||
28 | if (skb) { | ||
29 | __entry->protocol = ntohs(skb->protocol); | ||
30 | } | ||
31 | __entry->location = location; | ||
32 | ), | ||
33 | |||
34 | TP_printk("skbaddr=%p protocol=%u location=%p", | ||
35 | __entry->skbaddr, __entry->protocol, __entry->location) | ||
36 | ); | ||
37 | |||
38 | #undef TRACE_SYSTEM | ||
diff --git a/include/trace/trace_event_types.h b/include/trace/trace_event_types.h index df56f5694be6..33b6bfcba93b 100644 --- a/include/trace/trace_event_types.h +++ b/include/trace/trace_event_types.h | |||
@@ -3,3 +3,4 @@ | |||
3 | #include <trace/sched_event_types.h> | 3 | #include <trace/sched_event_types.h> |
4 | #include <trace/irq_event_types.h> | 4 | #include <trace/irq_event_types.h> |
5 | #include <trace/lockdep_event_types.h> | 5 | #include <trace/lockdep_event_types.h> |
6 | #include <trace/skb_event_types.h> | ||
diff --git a/include/trace/trace_events.h b/include/trace/trace_events.h index fd13750ca4ba..0e2aa80076d9 100644 --- a/include/trace/trace_events.h +++ b/include/trace/trace_events.h | |||
@@ -3,3 +3,4 @@ | |||
3 | #include <trace/sched.h> | 3 | #include <trace/sched.h> |
4 | #include <trace/irq.h> | 4 | #include <trace/irq.h> |
5 | #include <trace/lockdep.h> | 5 | #include <trace/lockdep.h> |
6 | #include <trace/skb.h> | ||