lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-3e4b10d7a4d2a78af64f8096dc7cdb3bebd65adb@git.kernel.org>
Date:	Wed, 8 Sep 2010 08:34:18 GMT
From:	tip-bot for Neil Horman <nhorman@...driver.com>
To:	linux-tip-commits@...r.kernel.org
Cc:	mingo@...hat.com, mathieu.desnoyers@...icios.com,
	sanagi.koki@...fujitsu.com, fweisbec@...il.com,
	rostedt@...dmis.org, nhorman@...driver.com,
	scott.a.mcmillan@...el.com, tglx@...utronix.de,
	laijs@...fujitsu.com, hpa@...or.com, linux-kernel@...r.kernel.org,
	eric.dumazet@...il.com, kaneshige.kenji@...fujitsu.com,
	davem@...emloft.net, izumi.taku@...fujitsu.com,
	kosaki.motohiro@...fujitsu.com
Subject: [tip:perf/core] napi: Convert trace_napi_poll to TRACE_EVENT

Commit-ID:  3e4b10d7a4d2a78af64f8096dc7cdb3bebd65adb
Gitweb:     http://git.kernel.org/tip/3e4b10d7a4d2a78af64f8096dc7cdb3bebd65adb
Author:     Neil Horman <nhorman@...driver.com>
AuthorDate: Mon, 23 Aug 2010 18:43:51 +0900
Committer:  Frederic Weisbecker <fweisbec@...il.com>
CommitDate: Tue, 7 Sep 2010 17:51:01 +0200

napi: Convert trace_napi_poll to TRACE_EVENT

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@...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@...driver.com>
Acked-by: David S. Miller <davem@...emloft.net>
Acked-by: Neil Horman <nhorman@...driver.com>
Cc: Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
Cc: Kaneshige Kenji <kaneshige.kenji@...fujitsu.com>
Cc: Izumo Taku <izumi.taku@...fujitsu.com>
Cc: Kosaki Motohiro <kosaki.motohiro@...fujitsu.com>
Cc: Lai Jiangshan <laijs@...fujitsu.com>
Cc: Scott Mcmillan <scott.a.mcmillan@...el.com>
Cc: Steven Rostedt <rostedt@...dmis.org>
Cc: Eric Dumazet <eric.dumazet@...il.com>
LKML-Reference: <4C7242D7.4050009@...fujitsu.com>
Signed-off-by: Koki Sanagi <sanagi.koki@...fujitsu.com>
Signed-off-by: Frederic Weisbecker <fweisbec@...il.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_ */
 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ