[lkml]   [2009]   [Nov]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    Patch in this message
    Subject[PATCH][GIT PULL][v2.6.32] tracing: Fix event format export


    Please pull the latest tip/tracing/urgent tree, which can be found at:


    Johannes Berg (1):
    tracing: Fix event format export

    include/trace/ftrace.h | 2 +-
    1 files changed, 1 insertions(+), 1 deletions(-)
    commit 811cb50baf63461ce0bdb234927046131fc7fa8b
    Author: Johannes Berg <>
    Date: Fri Nov 13 23:40:09 2009 +0100

    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.

    "\"%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:


    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 <>
    LKML-Reference: <>
    Signed-off-by: Steven Rostedt <>

    diff --git a/include/trace/ftrace.h b/include/trace/ftrace.h
    index cc0d966..dacb8ef 100644
    --- a/include/trace/ftrace.h
    +++ b/include/trace/ftrace.h
    @@ -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

     \ /
      Last update: 2009-11-14 05:15    [W:0.032 / U:13.936 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site