diff options
| -rw-r--r-- | include/trace/events/napi.h | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/include/trace/events/napi.h b/include/trace/events/napi.h index 188deca2f3c7..8fe1e93f531d 100644 --- a/include/trace/events/napi.h +++ b/include/trace/events/napi.h | |||
| @@ -6,10 +6,31 @@ | |||
| 6 | 6 | ||
| 7 | #include <linux/netdevice.h> | 7 | #include <linux/netdevice.h> |
| 8 | #include <linux/tracepoint.h> | 8 | #include <linux/tracepoint.h> |
| 9 | #include <linux/ftrace.h> | ||
| 10 | |||
| 11 | #define NO_DEV "(no_device)" | ||
| 12 | |||
| 13 | TRACE_EVENT(napi_poll, | ||
| 9 | 14 | ||
| 10 | DECLARE_TRACE(napi_poll, | ||
| 11 | TP_PROTO(struct napi_struct *napi), | 15 | TP_PROTO(struct napi_struct *napi), |
| 12 | TP_ARGS(napi)); | 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 | ||
| 13 | 34 | ||
| 14 | #endif /* _TRACE_NAPI_H_ */ | 35 | #endif /* _TRACE_NAPI_H_ */ |
| 15 | 36 | ||
