lkml.org 
[lkml]   [2009]   [Feb]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[PATCH 2/2] tracing: wrap arguments with PARAMS
    From: Steven Rostedt <srostedt@redhat.com>

    Peter Zijlstra warned that TPPROTO and TPARGS might become something
    other than a simple copy of itself. To prevent this from having
    side effects in the TRACE_FORMAT macro in tracepoint.h, we add a
    PARAMS() macro to be defined as just a wrapper.

    Reported-by: Peter Zijlstra <peterz@infradead.org>
    Signed-off-by: Steven Rostedt <srostedt@redhat.com>
    ---
    include/linux/tracepoint.h | 3 ++-
    1 files changed, 2 insertions(+), 1 deletions(-)

    diff --git a/include/linux/tracepoint.h b/include/linux/tracepoint.h
    index 3de09fa..62d1339 100644
    --- a/include/linux/tracepoint.h
    +++ b/include/linux/tracepoint.h
    @@ -153,7 +153,8 @@ static inline void tracepoint_synchronize_unregister(void)
    synchronize_sched();
    }

    +#define PARAMS(args...) args
    #define TRACE_FORMAT(name, proto, args, fmt) \
    - DECLARE_TRACE(name, TPPROTO(proto), TPARGS(args))
    + DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))

    #endif
    --
    1.5.6.5
    --


    \
     
     \ /
      Last update: 2009-02-25 23:17    [W:0.020 / U:0.096 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site