From: Frederic Weisbecker <fweisbec@gmail.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: LKML <linux-kernel@vger.kernel.org>,
Neil Horman <nhorman@tuxdriver.com>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
Kaneshige Kenji <kaneshige.kenji@jp.fujitsu.com>,
Izumo Taku <izumi.taku@jp.fujitsu.com>,
Kosaki Motohiro <kosaki.motohiro@jp.fujitsu.com>,
Lai Jiangshan <laijs@cn.fujitsu.com>,
Scott Mcmillan <scott.a.mcmillan@intel.com>,
Steven Rostedt <rostedt@goodmis.org>,
Eric Dumazet <eric.dumazet@gmail.com>,
Koki Sanagi <sanagi.koki@jp.fujitsu.com>,
Frederic Weisbecker <fweisbec@gmail.com>
Subject: [PATCH 2/5] napi: Convert trace_napi_poll to TRACE_EVENT
Date: Tue, 7 Sep 2010 18:48:08 +0200 [thread overview]
Message-ID: <1283878091-5751-3-git-send-regression-fweisbec@gmail.com> (raw)
In-Reply-To: <1283878091-5751-1-git-send-regression-fweisbec@gmail.com>
From: Neil Horman <nhorman@tuxdriver.com>
This patch converts trace_napi_poll from DECLARE_EVENT to TRACE_EVENT
to improve the usability of napi_poll tracepoint.
<idle>-0 [001] 241302.750777: napi_poll: napi poll on napi struct f6acc480 for device eth3
<idle>-0 [000] 241302.852389: napi_poll: napi poll on napi struct f5d0d70c for device eth1
The original patch is below:
http://marc.info/?l=linux-kernel&m=126021713809450&w=2
[ sanagi.koki@jp.fujitsu.com: And add a fix by Steven Rostedt:
http://marc.info/?l=linux-kernel&m=126150506519173&w=2 ]
Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: David S. Miller <davem@davemloft.net>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Kaneshige Kenji <kaneshige.kenji@jp.fujitsu.com>
Cc: Izumo Taku <izumi.taku@jp.fujitsu.com>
Cc: Kosaki Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Lai Jiangshan <laijs@cn.fujitsu.com>
Cc: Scott Mcmillan <scott.a.mcmillan@intel.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Eric Dumazet <eric.dumazet@gmail.com>
LKML-Reference: <4C7242D7.4050009@jp.fujitsu.com>
Signed-off-by: Koki Sanagi <sanagi.koki@jp.fujitsu.com>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
---
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 188deca..8fe1e93 100644
--- a/include/trace/events/napi.h
+++ b/include/trace/events/napi.h
@@ -6,10 +6,31 @@
#include <linux/netdevice.h>
#include <linux/tracepoint.h>
+#include <linux/ftrace.h>
+
+#define NO_DEV "(no_device)"
+
+TRACE_EVENT(napi_poll,
-DECLARE_TRACE(napi_poll,
TP_PROTO(struct napi_struct *napi),
- TP_ARGS(napi));
+
+ TP_ARGS(napi),
+
+ TP_STRUCT__entry(
+ __field( struct napi_struct *, napi)
+ __string( dev_name, napi->dev ? napi->dev->name : NO_DEV)
+ ),
+
+ TP_fast_assign(
+ __entry->napi = napi;
+ __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))
+);
+
+#undef NO_DEV
#endif /* _TRACE_NAPI_H_ */
--
1.6.2.3
next prev parent reply other threads:[~2010-09-07 16:48 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-07 16:48 [GIT PULL] tracing updates Frederic Weisbecker
2010-09-07 16:48 ` [PATCH 1/5] irq: Add tracepoint to softirq_raise Frederic Weisbecker
2010-09-07 16:48 ` Frederic Weisbecker [this message]
2010-09-07 16:48 ` [PATCH 3/5] netdev: Add tracepoints to netdev layer Frederic Weisbecker
2010-09-07 16:48 ` [PATCH 4/5] skb: Add tracepoints to freeing skb Frederic Weisbecker
2010-09-07 16:48 ` [PATCH 5/5] perf: Add a script to show packets processing Frederic Weisbecker
2010-09-08 6:05 ` [GIT PULL] tracing updates Ingo Molnar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1283878091-5751-3-git-send-regression-fweisbec@gmail.com \
--to=fweisbec@gmail.com \
--cc=eric.dumazet@gmail.com \
--cc=izumi.taku@jp.fujitsu.com \
--cc=kaneshige.kenji@jp.fujitsu.com \
--cc=kosaki.motohiro@jp.fujitsu.com \
--cc=laijs@cn.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=mingo@elte.hu \
--cc=nhorman@tuxdriver.com \
--cc=rostedt@goodmis.org \
--cc=sanagi.koki@jp.fujitsu.com \
--cc=scott.a.mcmillan@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome