Re: [PATCH] tracing: Cleanup the convoluted softirq tracepoints

From: Thomas Gleixner
Date: Thu Oct 21 2010 - 12:55:20 EST




On Tue, 19 Oct 2010, Steven Rostedt wrote:

> 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?

Nope, same result.

Thanks,

tglx

> -- 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) \
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/