2010-05-05 21:52:31 +07:00
|
|
|
#undef TRACE_SYSTEM
|
|
|
|
#define TRACE_SYSTEM napi
|
|
|
|
|
|
|
|
#if !defined(_TRACE_NAPI_H) || defined(TRACE_HEADER_MULTI_READ)
|
2009-05-21 14:36:08 +07:00
|
|
|
#define _TRACE_NAPI_H_
|
|
|
|
|
|
|
|
#include <linux/netdevice.h>
|
|
|
|
#include <linux/tracepoint.h>
|
2010-08-23 16:43:51 +07:00
|
|
|
#include <linux/ftrace.h>
|
|
|
|
|
|
|
|
#define NO_DEV "(no_device)"
|
|
|
|
|
|
|
|
TRACE_EVENT(napi_poll,
|
2009-05-21 14:36:08 +07:00
|
|
|
|
2016-07-07 23:01:32 +07:00
|
|
|
TP_PROTO(struct napi_struct *napi, int work, int budget),
|
2010-08-23 16:43:51 +07:00
|
|
|
|
2016-07-07 23:01:32 +07:00
|
|
|
TP_ARGS(napi, work, budget),
|
2010-08-23 16:43:51 +07:00
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
|
|
|
__field( struct napi_struct *, napi)
|
2016-07-16 04:55:20 +07:00
|
|
|
__string( dev_name, napi->dev ? napi->dev->name : NO_DEV)
|
2016-07-07 23:01:32 +07:00
|
|
|
__field( int, work)
|
|
|
|
__field( int, budget)
|
2010-08-23 16:43:51 +07:00
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
|
|
|
__entry->napi = napi;
|
2016-07-16 04:55:20 +07:00
|
|
|
__assign_str(dev_name, napi->dev ? napi->dev->name : NO_DEV);
|
2016-07-07 23:01:32 +07:00
|
|
|
__entry->work = work;
|
|
|
|
__entry->budget = budget;
|
2010-08-23 16:43:51 +07:00
|
|
|
),
|
|
|
|
|
2016-07-07 23:01:32 +07:00
|
|
|
TP_printk("napi poll on napi struct %p for device %s work %d budget %d",
|
|
|
|
__entry->napi, __get_str(dev_name),
|
|
|
|
__entry->work, __entry->budget)
|
2010-08-23 16:43:51 +07:00
|
|
|
);
|
|
|
|
|
|
|
|
#undef NO_DEV
|
2009-05-21 14:36:08 +07:00
|
|
|
|
2010-05-05 21:52:31 +07:00
|
|
|
#endif /* _TRACE_NAPI_H_ */
|
|
|
|
|
|
|
|
/* This part must be outside protection */
|
|
|
|
#include <trace/define_trace.h>
|