]>
Commit | Line | Data |
---|---|---|
b2441318 | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
2e26ca71 SR |
2 | #undef TRACE_SYSTEM |
3 | #define TRACE_SYSTEM napi | |
4 | ||
5 | #if !defined(_TRACE_NAPI_H) || defined(TRACE_HEADER_MULTI_READ) | |
b1d45c23 | 6 | #define _TRACE_NAPI_H |
4ea7e386 NH |
7 | |
8 | #include <linux/netdevice.h> | |
9 | #include <linux/tracepoint.h> | |
3e4b10d7 NH |
10 | #include <linux/ftrace.h> |
11 | ||
12 | #define NO_DEV "(no_device)" | |
13 | ||
14 | TRACE_EVENT(napi_poll, | |
4ea7e386 | 15 | |
1db19db7 | 16 | TP_PROTO(struct napi_struct *napi, int work, int budget), |
3e4b10d7 | 17 | |
1db19db7 | 18 | TP_ARGS(napi, work, budget), |
3e4b10d7 NH |
19 | |
20 | TP_STRUCT__entry( | |
21 | __field( struct napi_struct *, napi) | |
02a19877 | 22 | __string( dev_name, napi->dev ? napi->dev->name : NO_DEV) |
1db19db7 JDB |
23 | __field( int, work) |
24 | __field( int, budget) | |
3e4b10d7 NH |
25 | ), |
26 | ||
27 | TP_fast_assign( | |
28 | __entry->napi = napi; | |
02a19877 | 29 | __assign_str(dev_name, napi->dev ? napi->dev->name : NO_DEV); |
1db19db7 JDB |
30 | __entry->work = work; |
31 | __entry->budget = budget; | |
3e4b10d7 NH |
32 | ), |
33 | ||
1db19db7 JDB |
34 | TP_printk("napi poll on napi struct %p for device %s work %d budget %d", |
35 | __entry->napi, __get_str(dev_name), | |
36 | __entry->work, __entry->budget) | |
3e4b10d7 NH |
37 | ); |
38 | ||
39 | #undef NO_DEV | |
4ea7e386 | 40 | |
b1d45c23 | 41 | #endif /* _TRACE_NAPI_H */ |
2e26ca71 SR |
42 | |
43 | /* This part must be outside protection */ | |
44 | #include <trace/define_trace.h> |