public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Koki Sanagi <sanagi.koki@jp•fujitsu.com>
To: netdev@vger•kernel.org
Cc: davem@davemloft•net, kaneshige.kenji@jp•fujitsu.com,
	izumi.taku@jp•fujitsu.com, nhorman@tuxdriver•com
Subject: [RFC PATCH 2/5] napi: convert trace_napi_poll to TRACE_EVENT
Date: Tue, 08 Jun 2010 14:28:59 +0900	[thread overview]
Message-ID: <4C0DD51B.8020403@jp.fujitsu.com> (raw)
In-Reply-To: <4C0DD43F.9090902@jp.fujitsu.com>

This patch converts trace_napi_poll from DECLARE_EVENT to TRACE_EVENT.
This is a same patch Neil Horman submitted.
http://marc.info/?l=linux-kernel&m=125978157926853&w=2

Signed-off-by: Koki Sanagi <sanagi.koki@jp•fujitsu.com>
---
 include/trace/events/napi.h |   23 +++++++++++++++++++++--
 1 files changed, 21 insertions(+), 2 deletions(-)

diff --git a/include/trace/events/napi.h b/include/trace/events/napi.h
index 188deca..512a057 100644
--- a/include/trace/events/napi.h
+++ b/include/trace/events/napi.h
@@ -6,10 +6,29 @@
 
 #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))
+);
 
 #endif /* _TRACE_NAPI_H_ */
 



  parent reply	other threads:[~2010-06-08  5:28 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-08  5:25 [RFC PATCH 0/5] netdev: show a process of packets Koki Sanagi
2010-06-08  5:27 ` [RFC PATCH 1/5] irq: add tracepoint to softirq_raise Koki Sanagi
2010-06-08  5:28 ` Koki Sanagi [this message]
2010-06-08  5:30 ` [RFC PATCH 3/5] netdev: add tracepoints to netdev layer Koki Sanagi
2010-06-08  5:30 ` [RFC PATCH 4/5] skb: add tracepoints to freeing skb Koki Sanagi
2010-06-08  5:31 ` [RFC PATCH 5/5] perf:add a script shows a process of packet Koki Sanagi

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=4C0DD51B.8020403@jp.fujitsu.com \
    --to=sanagi.koki@jp$(echo .)fujitsu.com \
    --cc=davem@davemloft$(echo .)net \
    --cc=izumi.taku@jp$(echo .)fujitsu.com \
    --cc=kaneshige.kenji@jp$(echo .)fujitsu.com \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=nhorman@tuxdriver$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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