mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] trace: fix undefined tracing functions build error
@ 2017-10-26  8:37 Julien Thierry
  2017-10-26 10:55 ` Steven Rostedt
  0 siblings, 1 reply; 3+ messages in thread
From: Julien Thierry @ 2017-10-26  8:37 UTC (permalink / raw)
  To: linux-kernel; +Cc: Julien Thierry, Steven Rostedt, Ingo Molnar

When selecting CONFIG_PREEMPTIRQ_EVENTS without CONFIG_DEBUG_PREEMPT,
trace_preempt_(en|dis)able_* names do not get defined. This causes a build
error in function trace_preempt_off (kernel/trace/trace_irqsoff.c) when
CONFIG_PREEMPT_TRACER is enabled.

Similarly, when selecting CONFIG_PREEMPTIRQ_EVENTS and
CONFIG_PROVE_LOCKING, trace_irq_(en|dis)able_* names do not get defined,
although it seems they do not get referenced in that configuration.

Ensure trace_(irq|preempt)_* names are always defined, becoming empty
macros in the cases where they were not defined previously.

Signed-off-by: Julien Thierry <julien.thierry@arm.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Ingo Molnar <mingo@redhat.com>
---
 include/trace/events/preemptirq.h | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/include/trace/events/preemptirq.h b/include/trace/events/preemptirq.h
index f5024c5..9c4eb33 100644
--- a/include/trace/events/preemptirq.h
+++ b/include/trace/events/preemptirq.h
@@ -56,15 +56,18 @@

 #include <trace/define_trace.h>

-#else /* !CONFIG_PREEMPTIRQ_EVENTS */
+#endif /* !CONFIG_PREEMPTIRQ_EVENTS */

+#if !defined(CONFIG_PREEMPTIRQ_EVENTS) || defined(CONFIG_PROVE_LOCKING)
 #define trace_irq_enable(...)
 #define trace_irq_disable(...)
-#define trace_preempt_enable(...)
-#define trace_preempt_disable(...)
 #define trace_irq_enable_rcuidle(...)
 #define trace_irq_disable_rcuidle(...)
+#endif
+
+#if !defined(CONFIG_PREEMPTIRQ_EVENTS) || !defined(CONFIG_DEBUG_PREEMPT)
+#define trace_preempt_enable(...)
+#define trace_preempt_disable(...)
 #define trace_preempt_enable_rcuidle(...)
 #define trace_preempt_disable_rcuidle(...)
-
 #endif
--
1.9.1

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] trace: fix undefined tracing functions build error
  2017-10-26  8:37 [PATCH] trace: fix undefined tracing functions build error Julien Thierry
@ 2017-10-26 10:55 ` Steven Rostedt
  2017-10-31 17:41   ` Steven Rostedt
  0 siblings, 1 reply; 3+ messages in thread
From: Steven Rostedt @ 2017-10-26 10:55 UTC (permalink / raw)
  To: Julien Thierry; +Cc: linux-kernel, Ingo Molnar

On Thu, 26 Oct 2017 09:37:40 +0100
Julien Thierry <julien.thierry@arm.com> wrote:

> When selecting CONFIG_PREEMPTIRQ_EVENTS without CONFIG_DEBUG_PREEMPT,
> trace_preempt_(en|dis)able_* names do not get defined. This causes a build
> error in function trace_preempt_off (kernel/trace/trace_irqsoff.c) when
> CONFIG_PREEMPT_TRACER is enabled.
> 
> Similarly, when selecting CONFIG_PREEMPTIRQ_EVENTS and
> CONFIG_PROVE_LOCKING, trace_irq_(en|dis)able_* names do not get defined,
> although it seems they do not get referenced in that configuration.
> 
> Ensure trace_(irq|preempt)_* names are always defined, becoming empty
> macros in the cases where they were not defined previously.
> 

Thanks,

But I've seen another patch that I believe fixes this issue, but I'm
currently traveling in Prague, and attending several conferences there,
and haven't had time to look at my email.

When I get home next week I'll be applying patches sent to me.

Thanks,

-- Steve

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] trace: fix undefined tracing functions build error
  2017-10-26 10:55 ` Steven Rostedt
@ 2017-10-31 17:41   ` Steven Rostedt
  0 siblings, 0 replies; 3+ messages in thread
From: Steven Rostedt @ 2017-10-31 17:41 UTC (permalink / raw)
  To: Julien Thierry; +Cc: linux-kernel, Ingo Molnar

On Thu, 26 Oct 2017 06:55:51 -0400
Steven Rostedt <rostedt@goodmis.org> wrote:

> But I've seen another patch that I believe fixes this issue, but I'm
> currently traveling in Prague, and attending several conferences there,
> and haven't had time to look at my email.


Yep, Arnd beat you to it, and I applied his. Thanks for seeing this.

 http://lkml.kernel.org/r/20171019083230.2450779-1-arnd@arndb.de

-- Steve

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-10-31 17:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-26  8:37 [PATCH] trace: fix undefined tracing functions build error Julien Thierry
2017-10-26 10:55 ` Steven Rostedt
2017-10-31 17:41   ` Steven Rostedt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®