From: Julien Thierry <julien.thierry@arm.com>
To: linux-kernel@vger.kernel.org
Cc: Julien Thierry <julien.thierry@arm.com>,
Steven Rostedt <rostedt@goodmis.org>,
Ingo Molnar <mingo@redhat.com>
Subject: [PATCH] trace: fix undefined tracing functions build error
Date: Thu, 26 Oct 2017 09:37:40 +0100 [thread overview]
Message-ID: <1509007060-24191-1-git-send-email-julien.thierry@arm.com> (raw)
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
next reply other threads:[~2017-10-26 8:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-26 8:37 Julien Thierry [this message]
2017-10-26 10:55 ` [PATCH] trace: fix undefined tracing functions build error Steven Rostedt
2017-10-31 17:41 ` Steven Rostedt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1509007060-24191-1-git-send-email-julien.thierry@arm.com \
--to=julien.thierry@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=rostedt@goodmis.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox