2 #define TRACE_SYSTEM net
4 #if !defined(LTTNG_TRACE_NET_H) || defined(TRACE_HEADER_MULTI_READ)
5 #define LTTNG_TRACE_NET_H
7 #include "../../../probes/lttng-tracepoint-event.h"
8 #include <linux/skbuff.h>
9 #include <linux/netdevice.h>
11 #include <linux/version.h>
13 LTTNG_TRACEPOINT_EVENT(net_dev_xmit
,
15 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,40))
16 TP_PROTO(struct sk_buff
*skb
,
18 struct net_device
*dev
,
19 unsigned int skb_len
),
21 TP_ARGS(skb
, rc
, dev
, skb_len
),
23 TP_PROTO(struct sk_buff
*skb
,
30 __field( void *, skbaddr
)
31 __field( unsigned int, len
)
33 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,40))
34 __string( name
, dev
->name
)
36 __string( name
, skb
->dev
->name
)
40 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,40))
42 tp_assign(skbaddr
, skb
)
43 tp_assign(len
, skb_len
)
45 tp_strcpy(name
, dev
->name
)
49 tp_assign(skbaddr
, skb
)
50 tp_assign(len
, skb
->len
)
52 tp_strcpy(name
, skb
->dev
->name
)
56 TP_printk("dev=%s skbaddr=%p len=%u rc=%d",
57 __get_str(name
), __entry
->skbaddr
, __entry
->len
, __entry
->rc
)
60 LTTNG_TRACEPOINT_EVENT_CLASS(net_dev_template
,
62 TP_PROTO(struct sk_buff
*skb
),
67 __field( void *, skbaddr
)
68 __field( unsigned int, len
)
69 __string( name
, skb
->dev
->name
)
73 tp_assign(skbaddr
, skb
)
74 tp_assign(len
, skb
->len
)
75 tp_strcpy(name
, skb
->dev
->name
)
78 TP_printk("dev=%s skbaddr=%p len=%u",
79 __get_str(name
), __entry
->skbaddr
, __entry
->len
)
82 LTTNG_TRACEPOINT_EVENT_INSTANCE(net_dev_template
, net_dev_queue
,
84 TP_PROTO(struct sk_buff
*skb
),
89 LTTNG_TRACEPOINT_EVENT_INSTANCE(net_dev_template
, netif_receive_skb
,
91 TP_PROTO(struct sk_buff
*skb
),
96 LTTNG_TRACEPOINT_EVENT_INSTANCE(net_dev_template
, netif_rx
,
98 TP_PROTO(struct sk_buff
*skb
),
102 #endif /* LTTNG_TRACE_NET_H */
104 /* This part must be outside protection */
105 #include "../../../probes/define_trace.h"
This page took 0.030122 seconds and 4 git commands to generate.