Re: [PATCH] tracing: Fix trace_preempt_{on,off} for !CONFIG_DEBUG_PREEMPT builds
From: Steven Rostedt
Date: Mon Dec 04 2017 - 06:26:15 EST
On Mon, 4 Dec 2017 09:46:42 +0000
Patrick Bellasi <patrick.bellasi@xxxxxxx> wrote:
> The new preempt enable/disable events introduced by:
>
> d59158162 tracing: Add support for preempt and irq enable/disable events
>
> are defined only for CONFIG_DEBUG_PREEMPT kernels when the
> CONFIG_PREEMPTIRQ_EVENTS support, introduced by the above patch, is
> enabled.
>
> These events are generated within by trace_preempt_{on,off} calls,
> which are part of the the "Preemption-off Latency Tracer"
> (CONFIG_PREEMPT_TRACER).
>
> Currently these calls are (correctly) generated on CONFIG_PREEMPT_TRACER
> even when the kernel is !CONFIG_DEBUG_PREEMPT configured. Thus leading
> to an undefined reference to the new trace events.
>
> Let's ensure that we always have an (eventually) empty definition of the
> events for CONFIG_PREEMPTIRQ_EVENTS kernels.
>
> This patch will ensure that the additional preempt enabled/disable
> events are generated only when we have both:
> CONFIG_PREEMPT_TRACER && CONFIG_DEBUG_PREEMPT
>
> Signed-off-by: Patrick Bellasi <patrick.bellasi@xxxxxxx>
Thanks, but you're the third person to send me a fix for this. I have
the first fixed applied to my code based off of 4.14-rc1 but that
branch breaks my tests. I was waiting for rc2 to come out (which just
happened), to rebase on and run my tests. I'll do that now.
Thanks,
-- Steve