Cleanup: Remove toplevel directory from include search path
[lttng-modules.git] / include / instrumentation / events / lttng-module / napi.h
CommitLineData
b7cdc182 1/* SPDX-License-Identifier: GPL-2.0-only */
b283666f
PW
2#undef TRACE_SYSTEM
3#define TRACE_SYSTEM napi
4
3bc29f0a
MD
5#if !defined(LTTNG_TRACE_NAPI_H) || defined(TRACE_HEADER_MULTI_READ)
6#define LTTNG_TRACE_NAPI_H
b283666f 7
3b4aafcb 8#include <lttng/tracepoint-event.h>
b283666f 9#include <linux/netdevice.h>
b283666f
PW
10#include <linux/ftrace.h>
11
12#define NO_DEV "(no_device)"
13
9e869177
MD
14#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0))
15
16LTTNG_TRACEPOINT_EVENT(napi_poll,
17
18 TP_PROTO(struct napi_struct *napi, int work, int budget),
19
20 TP_ARGS(napi, work, budget),
21
22 TP_FIELDS(
23 ctf_integer_hex(struct napi_struct *, napi, napi)
24 ctf_string(dev_name, napi->dev ? napi->dev->name : NO_DEV)
25 ctf_integer(int, work, work)
26 ctf_integer(int, budget, budget)
27 )
28)
29
30#else
31
3bc29f0a 32LTTNG_TRACEPOINT_EVENT(napi_poll,
b283666f
PW
33
34 TP_PROTO(struct napi_struct *napi),
35
36 TP_ARGS(napi),
37
f127e61e 38 TP_FIELDS(
fa91fcac 39 ctf_integer_hex(struct napi_struct *, napi, napi)
f127e61e
MD
40 ctf_string(dev_name, napi->dev ? napi->dev->name : NO_DEV)
41 )
b283666f
PW
42)
43
9e869177
MD
44#endif
45
b283666f
PW
46#undef NO_DEV
47
3bc29f0a 48#endif /* LTTNG_TRACE_NAPI_H */
b283666f
PW
49
50/* This part must be outside protection */
3b4aafcb 51#include <lttng/define_trace.h>
This page took 0.03656 seconds and 4 git commands to generate.