Fix: update sched instrumentation for kernel 4.12
[lttng-modules.git] / instrumentation / events / lttng-module / net.h
1 #undef TRACE_SYSTEM
2 #define TRACE_SYSTEM net
3
4 #if !defined(LTTNG_TRACE_NET_H) || defined(TRACE_HEADER_MULTI_READ)
5 #define LTTNG_TRACE_NET_H
6
7 #include <probes/lttng-tracepoint-event.h>
8 #include <linux/skbuff.h>
9 #include <linux/netdevice.h>
10 #include <linux/ip.h>
11 #include <linux/version.h>
12
13 LTTNG_TRACEPOINT_EVENT(net_dev_xmit,
14
15 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,40))
16 TP_PROTO(struct sk_buff *skb,
17 int rc,
18 struct net_device *dev,
19 unsigned int skb_len),
20
21 TP_ARGS(skb, rc, dev, skb_len),
22 #else
23 TP_PROTO(struct sk_buff *skb,
24 int rc),
25
26 TP_ARGS(skb, rc),
27 #endif
28
29 TP_FIELDS(
30 ctf_integer_hex(void *, skbaddr, skb)
31 ctf_integer(int, rc, rc)
32 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,40))
33 ctf_integer(unsigned int, len, skb_len)
34 ctf_string(name, dev->name)
35 #else
36 ctf_integer(unsigned int, len, skb->len)
37 ctf_string(name, skb->dev->name)
38 #endif
39 )
40 )
41
42 LTTNG_TRACEPOINT_EVENT_CLASS(net_dev_template,
43
44 TP_PROTO(struct sk_buff *skb),
45
46 TP_ARGS(skb),
47
48 TP_FIELDS(
49 ctf_integer_hex(void *, skbaddr, skb)
50 ctf_integer(unsigned int, len, skb->len)
51 ctf_string(name, skb->dev->name)
52 )
53 )
54
55 LTTNG_TRACEPOINT_EVENT_INSTANCE(net_dev_template, net_dev_queue,
56
57 TP_PROTO(struct sk_buff *skb),
58
59 TP_ARGS(skb)
60 )
61
62 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(net_dev_template,
63
64 netif_receive_skb,
65
66 net_if_receive_skb,
67
68 TP_PROTO(struct sk_buff *skb),
69
70 TP_ARGS(skb)
71 )
72
73 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(net_dev_template,
74
75 netif_rx,
76
77 net_if_rx,
78
79 TP_PROTO(struct sk_buff *skb),
80
81 TP_ARGS(skb)
82 )
83 #endif /* LTTNG_TRACE_NET_H */
84
85 /* This part must be outside protection */
86 #include <probes/define_trace.h>
This page took 0.049085 seconds and 4 git commands to generate.