Migrate tracepoint instrumentation to TP_FIELDS
[lttng-modules.git] / instrumentation / events / lttng-module / skb.h
1 #undef TRACE_SYSTEM
2 #define TRACE_SYSTEM skb
3
4 #if !defined(LTTNG_TRACE_SKB_H) || defined(TRACE_HEADER_MULTI_READ)
5 #define LTTNG_TRACE_SKB_H
6
7 #include "../../../probes/lttng-tracepoint-event.h"
8 #include <linux/skbuff.h>
9 #include <linux/netdevice.h>
10 #include <linux/version.h>
11
12 /*
13 * Tracepoint for free an sk_buff:
14 */
15 LTTNG_TRACEPOINT_EVENT_MAP(kfree_skb,
16
17 skb_kfree,
18
19 TP_PROTO(struct sk_buff *skb, void *location),
20
21 TP_ARGS(skb, location),
22
23 TP_FIELDS(
24 ctf_integer(void *, skbaddr, skb)
25 ctf_integer(void *, location, location)
26 ctf_integer_network(unsigned short, protocol, skb->protocol)
27 )
28 )
29
30 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37))
31 LTTNG_TRACEPOINT_EVENT_MAP(consume_skb,
32
33 skb_consume,
34
35 TP_PROTO(struct sk_buff *skb),
36
37 TP_ARGS(skb),
38
39 TP_FIELDS(
40 ctf_integer(void *, skbaddr, skb)
41 )
42 )
43 #endif
44
45 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,32))
46 LTTNG_TRACEPOINT_EVENT(skb_copy_datagram_iovec,
47
48 TP_PROTO(const struct sk_buff *skb, int len),
49
50 TP_ARGS(skb, len),
51
52 TP_FIELDS(
53 ctf_integer(const void *, skbaddr, skb)
54 ctf_integer(int, len, len)
55 )
56 )
57 #endif
58
59 #endif /* LTTNG_TRACE_SKB_H */
60
61 /* This part must be outside protection */
62 #include "../../../probes/define_trace.h"
This page took 0.030188 seconds and 4 git commands to generate.