Fix: update sched instrumentation for kernel 4.12
[lttng-modules.git] / instrumentation / events / lttng-module / napi.h
1 #undef TRACE_SYSTEM
2 #define TRACE_SYSTEM napi
3
4 #if !defined(LTTNG_TRACE_NAPI_H) || defined(TRACE_HEADER_MULTI_READ)
5 #define LTTNG_TRACE_NAPI_H
6
7 #include <probes/lttng-tracepoint-event.h>
8 #include <linux/netdevice.h>
9 #include <linux/ftrace.h>
10
11 #define NO_DEV "(no_device)"
12
13 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0))
14
15 LTTNG_TRACEPOINT_EVENT(napi_poll,
16
17 TP_PROTO(struct napi_struct *napi, int work, int budget),
18
19 TP_ARGS(napi, work, budget),
20
21 TP_FIELDS(
22 ctf_integer_hex(struct napi_struct *, napi, napi)
23 ctf_string(dev_name, napi->dev ? napi->dev->name : NO_DEV)
24 ctf_integer(int, work, work)
25 ctf_integer(int, budget, budget)
26 )
27 )
28
29 #else
30
31 LTTNG_TRACEPOINT_EVENT(napi_poll,
32
33 TP_PROTO(struct napi_struct *napi),
34
35 TP_ARGS(napi),
36
37 TP_FIELDS(
38 ctf_integer_hex(struct napi_struct *, napi, napi)
39 ctf_string(dev_name, napi->dev ? napi->dev->name : NO_DEV)
40 )
41 )
42
43 #endif
44
45 #undef NO_DEV
46
47 #endif /* LTTNG_TRACE_NAPI_H */
48
49 /* This part must be outside protection */
50 #include <probes/define_trace.h>
This page took 0.030391 seconds and 4 git commands to generate.