lkml.org 
[lkml]   [2010]   [Oct]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    SubjectRe: [PATCH] tracing: Cleanup the convoluted softirq tracepoints
    From
    Date
    On Wed, 2010-10-20 at 00:04 +0200, Thomas Gleixner wrote:

    > hpa just posted code which does the _RIGHT_ _THING_ independent of any
    > compiler madness and you tracer folks just missed it.

    Thomas,

    Can you try this patch and see if it makes the object code better?

    -- Steve


    diff --git a/include/linux/tracepoint.h b/include/linux/tracepoint.h
    index a4a90b6..6264bd3 100644
    --- a/include/linux/tracepoint.h
    +++ b/include/linux/tracepoint.h
    @@ -144,14 +144,19 @@ static inline void tracepoint_update_probe_range(struct tracepoint *begin,
    */
    #define __DECLARE_TRACE(name, proto, args, data_proto, data_args) \
    extern struct tracepoint __tracepoint_##name; \
    - static inline void trace_##name(proto) \
    + static __always_inline int __trace_##name(proto) \
    { \
    JUMP_LABEL(&__tracepoint_##name.state, do_trace); \
    - return; \
    + return 0; \
    do_trace: \
    __DO_TRACE(&__tracepoint_##name, \
    TP_PROTO(data_proto), \
    TP_ARGS(data_args)); \
    + return 1; \
    + } \
    + static inline void trace_##name(proto) \
    + { \
    + unlikely(__trace_##name(args)); \
    } \
    static inline int \
    register_trace_##name(void (*probe)(data_proto), void *data) \



    \
     
     \ /
      Last update: 2010-10-20 00:37    [W:0.020 / U:31.936 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site