2ae36d655026e5fd211927386be56e45844902e5
[lttng-modules.git] / include / instrumentation / events / napi.h
1 // SPDX-FileCopyrightText: 2012 Paul Woegerer <paul_woegerer@mentor.com>
2 //
3 // SPDX-License-Identifier: GPL-2.0-only
4
5 #undef TRACE_SYSTEM
6 #define TRACE_SYSTEM napi
7
8 #if !defined(LTTNG_TRACE_NAPI_H) || defined(TRACE_HEADER_MULTI_READ)
9 #define LTTNG_TRACE_NAPI_H
10
11 #include <lttng/tracepoint-event.h>
12 #include <linux/netdevice.h>
13 #include <linux/ftrace.h>
14
15 #define NO_DEV "(no_device)"
16
17 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,8,0))
18
19 LTTNG_TRACEPOINT_EVENT(napi_poll,
20
21 TP_PROTO(struct napi_struct *napi, int work, int budget),
22
23 TP_ARGS(napi, work, budget),
24
25 TP_FIELDS(
26 ctf_integer_hex(struct napi_struct *, napi, napi)
27 ctf_string(dev_name, napi->dev ? napi->dev->name : NO_DEV)
28 ctf_integer(int, work, work)
29 ctf_integer(int, budget, budget)
30 )
31 )
32
33 #else
34
35 LTTNG_TRACEPOINT_EVENT(napi_poll,
36
37 TP_PROTO(struct napi_struct *napi),
38
39 TP_ARGS(napi),
40
41 TP_FIELDS(
42 ctf_integer_hex(struct napi_struct *, napi, napi)
43 ctf_string(dev_name, napi->dev ? napi->dev->name : NO_DEV)
44 )
45 )
46
47 #endif
48
49 #undef NO_DEV
50
51 #endif /* LTTNG_TRACE_NAPI_H */
52
53 /* This part must be outside protection */
54 #include <lttng/define_trace.h>
This page took 0.038151 seconds and 5 git commands to generate.