summaryrefslogtreecommitdiff
path: root/include/trace/events/napi.h
diff options
context:
space:
mode:
authorJesper Dangaard Brouer <brouer@redhat.com>2016-07-07 18:01:32 +0200
committerDavid S. Miller <davem@davemloft.net>2016-07-09 18:05:02 -0400
commit1db19db7f5ff4ddd3b1b6dd2092a87298ee5bd0b (patch)
treeb5f5b949245c9ff457db3fc5df523a3028351922 /include/trace/events/napi.h
parent89141e1c61c5390015285ab202a6f2a9a693e754 (diff)
net: tracepoint napi:napi_poll add work and budget
An important information for the napi_poll tracepoint is knowing the work done (packets processed) by the napi_poll() call. Add both the work done and budget, as they are related. Handle trace_napi_poll() param change in dropwatch/drop_monitor and in python perf script netdev-times.py in backward compat way, as python fortunately supports optional parameter handling. Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/trace/events/napi.h')
-rw-r--r--include/trace/events/napi.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/include/trace/events/napi.h b/include/trace/events/napi.h
index 8fe1e93f531d..118ed7767639 100644
--- a/include/trace/events/napi.h
+++ b/include/trace/events/napi.h
@@ -12,22 +12,27 @@
TRACE_EVENT(napi_poll,
- TP_PROTO(struct napi_struct *napi),
+ TP_PROTO(struct napi_struct *napi, int work, int budget),
- TP_ARGS(napi),
+ TP_ARGS(napi, work, budget),
TP_STRUCT__entry(
__field( struct napi_struct *, napi)
+ __field( int, work)
+ __field( int, budget)
__string( dev_name, napi->dev ? napi->dev->name : NO_DEV)
),
TP_fast_assign(
__entry->napi = napi;
+ __entry->work = work;
+ __entry->budget = budget;
__assign_str(dev_name, napi->dev ? napi->dev->name : NO_DEV);
),
- TP_printk("napi poll on napi struct %p for device %s",
- __entry->napi, __get_str(dev_name))
+ 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)
);
#undef NO_DEV