public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2.6.32] ftrace: fix event format export
@ 2009-11-13 12:37 Johannes Berg
  2009-11-13 13:22 ` Andreas Schwab
  2009-11-13 22:40 ` Ingo Molnar
  0 siblings, 2 replies; 14+ messages in thread
From: Johannes Berg @ 2009-11-13 12:37 UTC (permalink / raw)
  To: LKML

For some reason the export of the event print
format to userspace uses '#fmt' which breaks
if the format string is anything but a plain
string, for example if it is built with macros
then the macro names are exported instead of
their contents.

Use
	"\"%s\"", fmt
instead of
	"%s", #fmt
to export the string and not the way it is built.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
---
This is making the export of a bunch of events (only checked the
wireless ones but those are all affected) unusable, so please apply to
2.6.32.

 include/trace/ftrace.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- wireless-testing.orig/include/trace/ftrace.h	2009-11-13 13:15:21.000000000 +0100
+++ wireless-testing/include/trace/ftrace.h	2009-11-13 13:34:03.000000000 +0100
@@ -159,7 +159,7 @@
 #undef __get_str
 
 #undef TP_printk
-#define TP_printk(fmt, args...) "%s, %s\n", #fmt, __stringify(args)
+#define TP_printk(fmt, args...) "\"%s\", %s\n", fmt, __stringify(args)
 
 #undef TP_fast_assign
 #define TP_fast_assign(args...) args



^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2009-12-06 17:11 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-13 12:37 [PATCH 2.6.32] ftrace: fix event format export Johannes Berg
2009-11-13 13:22 ` Andreas Schwab
2009-11-13 13:29   ` Johannes Berg
2009-11-13 13:32     ` Johannes Berg
2009-11-13 22:40 ` Ingo Molnar
2009-11-13 23:28   ` Steven Rostedt
2009-11-14  9:21     ` Johannes Berg
2009-11-14  4:12   ` [PATCH][GIT PULL][v2.6.32] tracing: Fix " Steven Rostedt
2009-11-14  9:39     ` Ingo Molnar
2009-11-14 10:18   ` [tip:tracing/urgent] " tip-bot for Johannes Berg
2009-12-03 14:41     ` Steven Rostedt
2009-12-03 14:55       ` Ingo Molnar
2009-12-06 16:19         ` Johannes Berg
2009-12-06 17:11           ` Ingo Molnar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox