aboutsummaryrefslogtreecommitdiffstats
path: root/include/trace/ftrace.h
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2009-11-13 17:40:09 -0500
committerSteven Rostedt <rostedt@goodmis.org>2009-11-13 22:20:34 -0500
commit811cb50baf63461ce0bdb234927046131fc7fa8b (patch)
treeea161607e94f11754048c8769b37f58d55fe8de6 /include/trace/ftrace.h
parenta646365cc330b5aaf4452c91f61b1e0d1acf68d0 (diff)
tracing: Fix event format export
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. For example, in net/mac80211/driver-trace.h for the trace event drv_start there is: TP_printk( LOCAL_PR_FMT, LOCAL_PR_ARG ) Which use to produce: print fmt: LOCAL_PR_FMT, REC->wiphy_name Now produces: print fmt: "%s", REC->wiphy_name Signed-off-by: Johannes Berg <johannes@sipsolutions.net> LKML-Reference: <20091113224009.GB23942@elte.hu> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'include/trace/ftrace.h')
-rw-r--r--include/trace/ftrace.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/trace/ftrace.h b/include/trace/ftrace.h
index cc0d9667e18..dacb8ef6700 100644
--- a/include/trace/ftrace.h
+++ b/include/trace/ftrace.h
@@ -159,7 +159,7 @@
159#undef __get_str 159#undef __get_str
160 160
161#undef TP_printk 161#undef TP_printk
162#define TP_printk(fmt, args...) "%s, %s\n", #fmt, __stringify(args) 162#define TP_printk(fmt, args...) "\"%s\", %s\n", fmt, __stringify(args)
163 163
164#undef TP_fast_assign 164#undef TP_fast_assign
165#define TP_fast_assign(args...) args 165#define TP_fast_assign(args...) args