diff options
author | Arnd Bergmann <arnd@arndb.de> | 2017-10-19 04:32:13 -0400 |
---|---|---|
committer | Steven Rostedt (VMware) <rostedt@goodmis.org> | 2017-12-04 06:52:08 -0500 |
commit | 250d0c7754aa37c6443f07f1f5f591e2806295d8 (patch) | |
tree | 9d86fa48df78ccceb4544ea1d9ea583a26501093 | |
parent | 5a93bae2c382c588f437ce0395e8032ae287dc36 (diff) |
tracing: always define trace_{irq,preempt}_{enable_disable}
We get a build error in the irqsoff tracer in some configurations:
kernel/trace/trace_irqsoff.c: In function 'trace_preempt_on':
kernel/trace/trace_irqsoff.c:855:2: error: implicit declaration of function 'trace_preempt_enable_rcuidle'; did you mean 'trace_irq_enable_rcuidle'? [-Werror=implicit-function-declaration]
trace_preempt_enable_rcuidle(a0, a1);
The problem is that trace_preempt_enable_rcuidle() has different
definition based on multiple Kconfig symbols, but not all combinations
have a valid definition.
This changes the conditions so that we always get exactly one
definition of each of the four tracing macros. I have not tried
to verify that these definitions are sensible, but now we
can build all randconfig combinations again.
Link: http://lkml.kernel.org/r/20171019083230.2450779-1-arnd@arndb.de
Fixes: d59158162e03 ("tracing: Add support for preempt and irq enable/disable events")
Acked-by: Joel Fernandes <joelaf@google.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
-rw-r--r-- | include/trace/events/preemptirq.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/include/trace/events/preemptirq.h b/include/trace/events/preemptirq.h index f5024c560d8f..9c4eb33c5a1d 100644 --- a/include/trace/events/preemptirq.h +++ b/include/trace/events/preemptirq.h | |||
@@ -56,15 +56,18 @@ DEFINE_EVENT(preemptirq_template, preempt_enable, | |||
56 | 56 | ||
57 | #include <trace/define_trace.h> | 57 | #include <trace/define_trace.h> |
58 | 58 | ||
59 | #else /* !CONFIG_PREEMPTIRQ_EVENTS */ | 59 | #endif /* !CONFIG_PREEMPTIRQ_EVENTS */ |
60 | 60 | ||
61 | #if !defined(CONFIG_PREEMPTIRQ_EVENTS) || defined(CONFIG_PROVE_LOCKING) | ||
61 | #define trace_irq_enable(...) | 62 | #define trace_irq_enable(...) |
62 | #define trace_irq_disable(...) | 63 | #define trace_irq_disable(...) |
63 | #define trace_preempt_enable(...) | ||
64 | #define trace_preempt_disable(...) | ||
65 | #define trace_irq_enable_rcuidle(...) | 64 | #define trace_irq_enable_rcuidle(...) |
66 | #define trace_irq_disable_rcuidle(...) | 65 | #define trace_irq_disable_rcuidle(...) |
66 | #endif | ||
67 | |||
68 | #if !defined(CONFIG_PREEMPTIRQ_EVENTS) || !defined(CONFIG_DEBUG_PREEMPT) | ||
69 | #define trace_preempt_enable(...) | ||
70 | #define trace_preempt_disable(...) | ||
67 | #define trace_preempt_enable_rcuidle(...) | 71 | #define trace_preempt_enable_rcuidle(...) |
68 | #define trace_preempt_disable_rcuidle(...) | 72 | #define trace_preempt_disable_rcuidle(...) |
69 | |||
70 | #endif | 73 | #endif |