Fix: update sched instrumentation for kernel 4.12
[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
6ec43db8 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
f127e61e 23 TP_FIELDS(
fa91fcac
MD
24 ctf_integer_hex(void *, skbaddr, skb)
25 ctf_integer_hex(void *, location, location)
f127e61e
MD
26 ctf_integer_network(unsigned short, protocol, skb->protocol)
27 )
b283666f
PW
28)
29
7c68b363 30#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37))
3bc29f0a 31LTTNG_TRACEPOINT_EVENT_MAP(consume_skb,
9cf29d3e
MD
32
33 skb_consume,
b283666f
PW
34
35 TP_PROTO(struct sk_buff *skb),
36
37 TP_ARGS(skb),
38
f127e61e 39 TP_FIELDS(
fa91fcac 40 ctf_integer_hex(void *, skbaddr, skb)
f127e61e 41 )
b283666f 42)
7c68b363 43#endif
b283666f 44
7c68b363 45#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,32))
3bc29f0a 46LTTNG_TRACEPOINT_EVENT(skb_copy_datagram_iovec,
b283666f
PW
47
48 TP_PROTO(const struct sk_buff *skb, int len),
49
50 TP_ARGS(skb, len),
51
f127e61e 52 TP_FIELDS(
fa91fcac 53 ctf_integer_hex(const void *, skbaddr, skb)
f127e61e
MD
54 ctf_integer(int, len, len)
55 )
b283666f 56)
7c68b363 57#endif
b283666f 58
3bc29f0a 59#endif /* LTTNG_TRACE_SKB_H */
b283666f
PW
60
61/* This part must be outside protection */
6ec43db8 62#include <probes/define_trace.h>
This page took 0.033026 seconds and 4 git commands to generate.