Steven Rostedt | 2e26ca7 | 2010-05-05 10:52:31 -0400 | [diff] [blame] | 1 | #undef TRACE_SYSTEM |
| 2 | #define TRACE_SYSTEM napi |
| 3 | |
| 4 | #if !defined(_TRACE_NAPI_H) || defined(TRACE_HEADER_MULTI_READ) |
Neil Horman | 4ea7e38 | 2009-05-21 07:36:08 +0000 | [diff] [blame] | 5 | #define _TRACE_NAPI_H_ |
| 6 | |
| 7 | #include <linux/netdevice.h> |
| 8 | #include <linux/tracepoint.h> |
Neil Horman | 3e4b10d | 2010-08-23 18:43:51 +0900 | [diff] [blame] | 9 | #include <linux/ftrace.h> |
Neil Horman | 4ea7e38 | 2009-05-21 07:36:08 +0000 | [diff] [blame] | 10 | |
Neil Horman | 3e4b10d | 2010-08-23 18:43:51 +0900 | [diff] [blame] | 11 | #define NO_DEV "(no_device)" |
| 12 | |
| 13 | TRACE_EVENT(napi_poll, |
| 14 | |
Neil Horman | 4ea7e38 | 2009-05-21 07:36:08 +0000 | [diff] [blame] | 15 | TP_PROTO(struct napi_struct *napi), |
Neil Horman | 3e4b10d | 2010-08-23 18:43:51 +0900 | [diff] [blame] | 16 | |
| 17 | TP_ARGS(napi), |
| 18 | |
| 19 | TP_STRUCT__entry( |
| 20 | __field( struct napi_struct *, napi) |
| 21 | __string( dev_name, napi->dev ? napi->dev->name : NO_DEV) |
| 22 | ), |
| 23 | |
| 24 | TP_fast_assign( |
| 25 | __entry->napi = napi; |
| 26 | __assign_str(dev_name, napi->dev ? napi->dev->name : NO_DEV); |
| 27 | ), |
| 28 | |
| 29 | TP_printk("napi poll on napi struct %p for device %s", |
| 30 | __entry->napi, __get_str(dev_name)) |
| 31 | ); |
| 32 | |
| 33 | #undef NO_DEV |
Neil Horman | 4ea7e38 | 2009-05-21 07:36:08 +0000 | [diff] [blame] | 34 | |
Steven Rostedt | 2e26ca7 | 2010-05-05 10:52:31 -0400 | [diff] [blame] | 35 | #endif /* _TRACE_NAPI_H_ */ |
| 36 | |
| 37 | /* This part must be outside protection */ |
| 38 | #include <trace/define_trace.h> |