Re: [PATCH] tracing: fix TRACE_EVENT power tracepoint creation

From: Mathieu Desnoyers
Date: Thu Oct 28 2010 - 07:03:33 EST


* Steven Rostedt (rostedt@xxxxxxxxxxx) wrote:
> On Wed, 2010-10-27 at 22:16 -0400, Mathieu Desnoyers wrote:
> > DEFINE_TRACE should also exist when CONFIG_EVENT_TRACING=n. Otherwise, setting
> > only TRACEPOINTS=y is broken.
>
> NAK, DEFINE_TRACE is deprecated from use outside the tracing
> infrastructure.
>
[...]
> The trace/events/power.h file should handle the DEFINE_TRACE() when
> CONFIG_EVENT_TRACING is not set. Thus, this is the wrong fix.

DEFINE_TRACE() must only be done once over the whole kernel for a particular
tracepoint. Currently, it is done in power-traces.c when CONFIG_EVENT_TRACING is
activated. This is the only instance where trace/power.h is included with
CREATE_TRACE_POINTS set.

Given that trace/power.h is inluded in more than one .c file, generating
DEFINE_TRACE() when CREATE_TRACE_POINTS is not set does not work. So what
alternative do you suggest ?

Thanks,

Mathieu

--
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com
--
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/