Rename LTTng instrumentation macros
[lttng-modules.git] / instrumentation / events / lttng-module / skb.h
CommitLineData
b283666f
PW
1#undef TRACE_SYSTEM
2#define TRACE_SYSTEM skb
3
3bc29f0a
MD
4#if !defined(LTTNG_TRACE_SKB_H) || defined(TRACE_HEADER_MULTI_READ)
5#define LTTNG_TRACE_SKB_H
b283666f 6
3bc29f0a 7#include "../../../probes/lttng-tracepoint-event.h"
b283666f
PW
8#include <linux/skbuff.h>
9#include <linux/netdevice.h>
7c68b363 10#include <linux/version.h>
b283666f
PW
11
12/*
13 * Tracepoint for free an sk_buff:
14 */
3bc29f0a 15LTTNG_TRACEPOINT_EVENT_MAP(kfree_skb,
9cf29d3e
MD
16
17 skb_kfree,
b283666f
PW
18
19 TP_PROTO(struct sk_buff *skb, void *location),
20
21 TP_ARGS(skb, location),
22
23 TP_STRUCT__entry(
24 __field( void *, skbaddr )
25 __field( void *, location )
26 __field( unsigned short, protocol )
27 ),
28
29 TP_fast_assign(
d3ac4d63
PW
30 tp_assign(skbaddr, skb)
31 tp_assign(location, location)
32 tp_assign(protocol, ntohs(skb->protocol))
b283666f
PW
33 ),
34
35 TP_printk("skbaddr=%p protocol=%u location=%p",
36 __entry->skbaddr, __entry->protocol, __entry->location)
37)
38
7c68b363 39#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37))
3bc29f0a 40LTTNG_TRACEPOINT_EVENT_MAP(consume_skb,
9cf29d3e
MD
41
42 skb_consume,
b283666f
PW
43
44 TP_PROTO(struct sk_buff *skb),
45
46 TP_ARGS(skb),
47
48 TP_STRUCT__entry(
49 __field( void *, skbaddr )
50 ),
51
52 TP_fast_assign(
d3ac4d63 53 tp_assign(skbaddr, skb)
b283666f
PW
54 ),
55
56 TP_printk("skbaddr=%p", __entry->skbaddr)
57)
7c68b363 58#endif
b283666f 59
7c68b363 60#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,32))
3bc29f0a 61LTTNG_TRACEPOINT_EVENT(skb_copy_datagram_iovec,
b283666f
PW
62
63 TP_PROTO(const struct sk_buff *skb, int len),
64
65 TP_ARGS(skb, len),
66
67 TP_STRUCT__entry(
68 __field( const void *, skbaddr )
69 __field( int, len )
70 ),
71
72 TP_fast_assign(
d3ac4d63
PW
73 tp_assign(skbaddr, skb)
74 tp_assign(len, len)
b283666f
PW
75 ),
76
77 TP_printk("skbaddr=%p len=%d", __entry->skbaddr, __entry->len)
78)
7c68b363 79#endif
b283666f 80
3bc29f0a 81#endif /* LTTNG_TRACE_SKB_H */
b283666f
PW
82
83/* This part must be outside protection */
84#include "../../../probes/define_trace.h"
This page took 0.027944 seconds and 4 git commands to generate.