* [PATCH 0/2] tracing/preemptirq: Optimize disabled tracepoint overhead
@ 2025-06-26 14:20 Wander Lairson Costa
2025-06-26 14:20 ` [PATCH 1/2] trace/preemptirq: reduce overhead of irq_enable/disable tracepoints Wander Lairson Costa
2025-06-26 14:20 ` [PATCH 2/2] tracing/preemptirq: Optimize preempt_disable/enable() tracepoint overhead Wander Lairson Costa
0 siblings, 2 replies; 7+ messages in thread
From: Wander Lairson Costa @ 2025-06-26 14:20 UTC (permalink / raw)
To: Ingo Molnar, Peter Zijlstra, Juri Lelli, Vincent Guittot,
Dietmar Eggemann, Steven Rostedt, Ben Segall, Mel Gorman,
Valentin Schneider, Masami Hiramatsu, Mathieu Desnoyers,
Wander Lairson Costa, David Woodhouse, Thomas Gleixner,
Boqun Feng, open list, open list:TRACING
Cc: Arnaldo Carvalho de Melo, Clark Williams, Gabriele Monaco
This series addresses unnecessary overhead introduced by the
preempt/irq tracepoints when they are compiled into the kernel
but are not actively enabled (i.e., when tracing is disabled).
These optimizations ensure that when tracing is inactive, the kernel
can largely bypass operations that would otherwise incur a passive
performance penalty. This makes the impact of disabled preemptirq
IRQ and preempt tracing negligible in performance-sensitive environments.
Wander Lairson Costa (2):
trace/preemptirq: reduce overhead of irq_enable/disable tracepoints
tracing/preemptirq: Optimize preempt_disable/enable() tracepoint
overhead
---
Performance Measurements
Measurements were taken using a specialized kernel module [1] to benchmark
`local_irq_disable/enable()` and `preempt_disable/enable()` call pairs.
The kernel used for benchmarking was version 6.16.0-rc2. "Max Average"
represents the average of the 1000 highest samples, used to reduce noise
from single highest samples.
Each benchmark run collected 10^7 samples in parallel from each CPU
for each call pair (used for average, max_avg, and median calculations).
The 99th percentile was measured in a separate benchmark run, focused
on a single CPU.
The results show that compiling with tracers (Kernel Build:
`-master-trace`) introduced significant overhead compared to a base
kernel without tracers (Kernel Build: `-master`). After applying these
patches (Kernel Build: `-patched-trace`), the overhead is
substantially reduced, approaching the baseline.
x86-64 Metrics
Tests were run on a system equipped with an Intel(R) Xeon(R) Silver 4310 CPU.
IRQ Metrics
Combined Metric average max_avg median percentile
Kernel Build
6.16.0-rc2-master 28 5587 29 23
6.16.0-rc2-master-trace 46 7895 48 32
6.16.0-rc2-patched-trace 30 6030 31 27
Preempt Metrics
Combined Metric average max_avg median percentile
Kernel Build
6.16.0-rc2-master 26 5748 27 20
6.16.0-rc2-master-trace 45 7526 48 26
6.16.0-rc2-patched-trace 27 5479 27 21
AArch64 Metrics
Tests were also conducted on an AArch64 platform.
IRQ Metrics
Combined Metric average max_avg median percentile
Kernel Build
aarch64-6.16.0-rc2-master 28 3298 32 64
aarch64-6.16.0-rc2-master-trace 105 5769 96 128
aarch64-6.16.0-rc2-patched-trace 29 3192 32 64
Preempt Metrics
Combined Metric average max_avg median percentile
Kernel Build
aarch64-6.16.0-rc2-master 27 3371 32 32
aarch64-6.16.0-rc2-master-trace 32 3000 32 64
aarch64-6.16.0-rc2-patched-trace 28 3132 32 64
Suggested-by: Steven Rostedt <rostedt@goodmis.org>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Clark Williams <williams@redhat.com>
Cc: Gabriele Monaco <gmonaco@redhat.com>
Cc: Juri Lelli <juri.lelli@redhat.com>
---
References:
[1] https://github.com/walac/tracer-benchmark
Wander Lairson Costa (2):
trace/preemptirq: reduce overhead of irq_enable/disable tracepoints
tracing/preemptirq: Optimize preempt_disable/enable() tracepoint
overhead
include/linux/irqflags.h | 25 +++++++++++++++--------
include/linux/preempt.h | 35 ++++++++++++++++++++++++++++++---
kernel/sched/core.c | 12 +----------
kernel/trace/trace_preemptirq.c | 22 +++++++++++++++++++++
4 files changed, 72 insertions(+), 22 deletions(-)
--
2.50.0
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/2] trace/preemptirq: reduce overhead of irq_enable/disable tracepoints
2025-06-26 14:20 [PATCH 0/2] tracing/preemptirq: Optimize disabled tracepoint overhead Wander Lairson Costa
@ 2025-06-26 14:20 ` Wander Lairson Costa
2025-06-26 23:08 ` Steven Rostedt
2025-06-27 22:10 ` kernel test robot
2025-06-26 14:20 ` [PATCH 2/2] tracing/preemptirq: Optimize preempt_disable/enable() tracepoint overhead Wander Lairson Costa
1 sibling, 2 replies; 7+ messages in thread
From: Wander Lairson Costa @ 2025-06-26 14:20 UTC (permalink / raw)
To: Ingo Molnar, Peter Zijlstra, Juri Lelli, Vincent Guittot,
Dietmar Eggemann, Steven Rostedt, Ben Segall, Mel Gorman,
Valentin Schneider, Masami Hiramatsu, Mathieu Desnoyers,
Boqun Feng, David Woodhouse, Wander Lairson Costa,
Thomas Gleixner, open list, open list:TRACING
Cc: Arnaldo Carvalho de Melo, Clark Williams, Gabriele Monaco
The irqsoff tracer is rarely enabled in production systems due to the
non-negligible overhead it introduces—even when unused. This is caused
by how trace_hardirqs_on/off() are always invoked in
local_irq_enable/disable(), evaluate the tracepoint static key.
This patch reduces the overhead in the common case where the tracepoint
is disabled by performing the static key check earlier, avoiding the
call to trace_hardirqs_on/off() entirely.
This makes the impact of disabled preemptirq IRQ tracing negligible in
performance-sensitive environments.
Signed-off-by: Wander Lairson Costa <wander@redhat.com>
Suggested-by: Steven Rostedt <rostedt@goodmis.org>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Clark Williams <williams@redhat.com>
Cc: Gabriele Monaco <gmonaco@redhat.com>
Cc: Juri Lelli <juri.lelli@redhat.com>
---
include/linux/irqflags.h | 25 +++++++++++++++++--------
kernel/trace/trace_preemptirq.c | 3 +++
2 files changed, 20 insertions(+), 8 deletions(-)
diff --git a/include/linux/irqflags.h b/include/linux/irqflags.h
index 57b074e0cfbb..54f931db7e3b 100644
--- a/include/linux/irqflags.h
+++ b/include/linux/irqflags.h
@@ -17,6 +17,7 @@
#include <linux/cleanup.h>
#include <asm/irqflags.h>
#include <asm/percpu.h>
+#include <linux/tracepoint-defs.h>
struct task_struct;
@@ -197,9 +198,13 @@ extern void warn_bogus_irq_restore(void);
*/
#ifdef CONFIG_TRACE_IRQFLAGS
+DECLARE_TRACEPOINT(irq_enable);
+DECLARE_TRACEPOINT(irq_disable);
+
#define local_irq_enable() \
do { \
- trace_hardirqs_on(); \
+ if (tracepoint_enabled(irq_enable)) \
+ trace_hardirqs_on(); \
raw_local_irq_enable(); \
} while (0)
@@ -207,28 +212,32 @@ extern void warn_bogus_irq_restore(void);
do { \
bool was_disabled = raw_irqs_disabled();\
raw_local_irq_disable(); \
- if (!was_disabled) \
+ if (tracepoint_enabled(irq_disable) && \
+ !was_disabled) \
trace_hardirqs_off(); \
} while (0)
#define local_irq_save(flags) \
do { \
raw_local_irq_save(flags); \
- if (!raw_irqs_disabled_flags(flags)) \
+ if (tracepoint_enabled(irq_disable) && \
+ !raw_irqs_disabled_flags(flags)) \
trace_hardirqs_off(); \
} while (0)
#define local_irq_restore(flags) \
do { \
- if (!raw_irqs_disabled_flags(flags)) \
+ if (tracepoint_enabled(irq_enable) && \
+ !raw_irqs_disabled_flags(flags)) \
trace_hardirqs_on(); \
raw_local_irq_restore(flags); \
} while (0)
-#define safe_halt() \
- do { \
- trace_hardirqs_on(); \
- raw_safe_halt(); \
+#define safe_halt() \
+ do { \
+ if (tracepoint_enabled(irq_enable)) \
+ trace_hardirqs_on(); \
+ raw_safe_halt(); \
} while (0)
diff --git a/kernel/trace/trace_preemptirq.c b/kernel/trace/trace_preemptirq.c
index 0c42b15c3800..90ee65db4516 100644
--- a/kernel/trace/trace_preemptirq.c
+++ b/kernel/trace/trace_preemptirq.c
@@ -111,6 +111,9 @@ void trace_hardirqs_off(void)
}
EXPORT_SYMBOL(trace_hardirqs_off);
NOKPROBE_SYMBOL(trace_hardirqs_off);
+
+EXPORT_TRACEPOINT_SYMBOL(irq_disable);
+EXPORT_TRACEPOINT_SYMBOL(irq_enable);
#endif /* CONFIG_TRACE_IRQFLAGS */
#ifdef CONFIG_TRACE_PREEMPT_TOGGLE
--
2.50.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/2] tracing/preemptirq: Optimize preempt_disable/enable() tracepoint overhead
2025-06-26 14:20 [PATCH 0/2] tracing/preemptirq: Optimize disabled tracepoint overhead Wander Lairson Costa
2025-06-26 14:20 ` [PATCH 1/2] trace/preemptirq: reduce overhead of irq_enable/disable tracepoints Wander Lairson Costa
@ 2025-06-26 14:20 ` Wander Lairson Costa
2025-06-27 21:59 ` kernel test robot
2025-06-28 14:39 ` kernel test robot
1 sibling, 2 replies; 7+ messages in thread
From: Wander Lairson Costa @ 2025-06-26 14:20 UTC (permalink / raw)
To: Ingo Molnar, Peter Zijlstra, Juri Lelli, Vincent Guittot,
Dietmar Eggemann, Steven Rostedt, Ben Segall, Mel Gorman,
Valentin Schneider, Masami Hiramatsu, Mathieu Desnoyers,
Thomas Gleixner, Wander Lairson Costa, Boqun Feng,
David Woodhouse, open list, open list:TRACING
Cc: Arnaldo Carvalho de Melo, Clark Williams, Gabriele Monaco
Similar to the IRQ tracepoint, the preempt tracepoints are typically
disabled in production systems due to the significant overhead they
introduce even when not in use.
The overhead primarily comes from two sources: First, when tracepoints
are compiled into the kernel, preempt_count_add() and preempt_count_sub()
become external function calls rather than inlined operations. Second,
these functions perform unnecessary preempt_count() checks even when the
tracepoint itself is disabled.
This optimization introduces an early check of the tracepoint static key,
which allows us to skip both the function call overhead and the redundant
preempt_count() checks when tracing is disabled. The change maintains all
existing functionality when tracing is active while significantly
reducing overhead for the common case where tracing is inactive.
Signed-off-by: Wander Lairson Costa <wander@redhat.com>
Suggested-by: Steven Rostedt <rostedt@goodmis.org>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Clark Williams <williams@redhat.com>
Cc: Gabriele Monaco <gmonaco@redhat.com>
Cc: Juri Lelli <juri.lelli@redhat.com>
---
include/linux/preempt.h | 35 ++++++++++++++++++++++++++++++---
kernel/sched/core.c | 12 +----------
kernel/trace/trace_preemptirq.c | 19 ++++++++++++++++++
3 files changed, 52 insertions(+), 14 deletions(-)
diff --git a/include/linux/preempt.h b/include/linux/preempt.h
index b0af8d4ef6e6..d13c755cd934 100644
--- a/include/linux/preempt.h
+++ b/include/linux/preempt.h
@@ -10,6 +10,7 @@
#include <linux/linkage.h>
#include <linux/cleanup.h>
#include <linux/types.h>
+#include <linux/tracepoint-defs.h>
/*
* We put the hardirq and softirq counter into the preemption
@@ -191,17 +192,45 @@ static __always_inline unsigned char interrupt_context_level(void)
*/
#define in_atomic_preempt_off() (preempt_count() != PREEMPT_DISABLE_OFFSET)
-#if defined(CONFIG_DEBUG_PREEMPT) || defined(CONFIG_TRACE_PREEMPT_TOGGLE)
+#if defined(CONFIG_DEBUG_PREEMPT)
extern void preempt_count_add(int val);
extern void preempt_count_sub(int val);
-#define preempt_count_dec_and_test() \
- ({ preempt_count_sub(1); should_resched(0); })
+#elif defined(CONFIG_TRACE_PREEMPT_TOGGLE)
+extern void __trace_preempt_on(void);
+extern void __trace_preempt_off(void);
+
+DECLARE_TRACEPOINT(preempt_enable);
+DECLARE_TRACEPOINT(preempt_disable);
+
+#define __preempt_trace_enabled(type) \
+ (tracepoint_enabled(preempt_##type) && preempt_count() == val)
+
+static inline void preempt_count_add(int val)
+{
+ __preempt_count_add(val);
+
+ if (__preempt_trace_enabled(disable))
+ __trace_preempt_off();
+}
+
+static inline void preempt_count_sub(int val)
+{
+ if (__preempt_trace_enabled(enable))
+ __trace_preempt_on();
+
+ __preempt_count_sub(val);
+}
#else
#define preempt_count_add(val) __preempt_count_add(val)
#define preempt_count_sub(val) __preempt_count_sub(val)
#define preempt_count_dec_and_test() __preempt_count_dec_and_test()
#endif
+#if defined(CONFIG_DEBUG_PREEMPT) || defined(CONFIG_TRACE_PREEMPT_TOGGLE)
+#define preempt_count_dec_and_test() \
+ ({ preempt_count_sub(1); should_resched(0); })
+#endif
+
#define __preempt_count_inc() __preempt_count_add(1)
#define __preempt_count_dec() __preempt_count_sub(1)
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 8988d38d46a3..4feba4738d79 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -5840,8 +5840,7 @@ static inline void sched_tick_start(int cpu) { }
static inline void sched_tick_stop(int cpu) { }
#endif
-#if defined(CONFIG_PREEMPTION) && (defined(CONFIG_DEBUG_PREEMPT) || \
- defined(CONFIG_TRACE_PREEMPT_TOGGLE))
+#if defined(CONFIG_PREEMPTION) && defined(CONFIG_DEBUG_PREEMPT)
/*
* If the value passed in is equal to the current preempt count
* then we just disabled preemption. Start timing the latency.
@@ -5850,30 +5849,24 @@ static inline void preempt_latency_start(int val)
{
if (preempt_count() == val) {
unsigned long ip = get_lock_parent_ip();
-#ifdef CONFIG_DEBUG_PREEMPT
current->preempt_disable_ip = ip;
-#endif
trace_preempt_off(CALLER_ADDR0, ip);
}
}
void preempt_count_add(int val)
{
-#ifdef CONFIG_DEBUG_PREEMPT
/*
* Underflow?
*/
if (DEBUG_LOCKS_WARN_ON((preempt_count() < 0)))
return;
-#endif
__preempt_count_add(val);
-#ifdef CONFIG_DEBUG_PREEMPT
/*
* Spinlock count overflowing soon?
*/
DEBUG_LOCKS_WARN_ON((preempt_count() & PREEMPT_MASK) >=
PREEMPT_MASK - 10);
-#endif
preempt_latency_start(val);
}
EXPORT_SYMBOL(preempt_count_add);
@@ -5891,7 +5884,6 @@ static inline void preempt_latency_stop(int val)
void preempt_count_sub(int val)
{
-#ifdef CONFIG_DEBUG_PREEMPT
/*
* Underflow?
*/
@@ -5903,14 +5895,12 @@ void preempt_count_sub(int val)
if (DEBUG_LOCKS_WARN_ON((val < PREEMPT_MASK) &&
!(preempt_count() & PREEMPT_MASK)))
return;
-#endif
preempt_latency_stop(val);
__preempt_count_sub(val);
}
EXPORT_SYMBOL(preempt_count_sub);
NOKPROBE_SYMBOL(preempt_count_sub);
-
#else
static inline void preempt_latency_start(int val) { }
static inline void preempt_latency_stop(int val) { }
diff --git a/kernel/trace/trace_preemptirq.c b/kernel/trace/trace_preemptirq.c
index 90ee65db4516..deb2428b34a2 100644
--- a/kernel/trace/trace_preemptirq.c
+++ b/kernel/trace/trace_preemptirq.c
@@ -118,6 +118,25 @@ EXPORT_TRACEPOINT_SYMBOL(irq_enable);
#ifdef CONFIG_TRACE_PREEMPT_TOGGLE
+#if !defined(CONFIG_DEBUG_PREEMPT)
+EXPORT_SYMBOL(__tracepoint_preempt_disable);
+EXPORT_SYMBOL(__tracepoint_preempt_enable);
+
+void __trace_preempt_on(void)
+{
+ trace_preempt_on(CALLER_ADDR0, get_lock_parent_ip());
+}
+EXPORT_SYMBOL(__trace_preempt_on);
+NOKPROBE_SYMBOL(__trace_preempt_on);
+
+void __trace_preempt_off(void)
+{
+ trace_preempt_off(CALLER_ADDR0, get_lock_parent_ip());
+}
+EXPORT_SYMBOL(__trace_preempt_off);
+NOKPROBE_SYMBOL(__trace_preempt_off);
+#endif /* !CONFIG_DEBUG_PREEMPT */
+
void trace_preempt_on(unsigned long a0, unsigned long a1)
{
trace(preempt_enable, TP_ARGS(a0, a1));
--
2.50.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] trace/preemptirq: reduce overhead of irq_enable/disable tracepoints
2025-06-26 14:20 ` [PATCH 1/2] trace/preemptirq: reduce overhead of irq_enable/disable tracepoints Wander Lairson Costa
@ 2025-06-26 23:08 ` Steven Rostedt
2025-06-27 22:10 ` kernel test robot
1 sibling, 0 replies; 7+ messages in thread
From: Steven Rostedt @ 2025-06-26 23:08 UTC (permalink / raw)
To: Wander Lairson Costa
Cc: Ingo Molnar, Peter Zijlstra, Juri Lelli, Vincent Guittot,
Dietmar Eggemann, Ben Segall, Mel Gorman, Valentin Schneider,
Masami Hiramatsu, Mathieu Desnoyers, Boqun Feng, David Woodhouse,
Thomas Gleixner, open list, open list:TRACING,
Arnaldo Carvalho de Melo, Clark Williams, Gabriele Monaco
On Thu, 26 Jun 2025 11:20:09 -0300
Wander Lairson Costa <wander@redhat.com> wrote:
> @@ -197,9 +198,13 @@ extern void warn_bogus_irq_restore(void);
> */
> #ifdef CONFIG_TRACE_IRQFLAGS
>
> +DECLARE_TRACEPOINT(irq_enable);
> +DECLARE_TRACEPOINT(irq_disable);
> +
> #define local_irq_enable() \
> do { \
> - trace_hardirqs_on(); \
> + if (tracepoint_enabled(irq_enable)) \
> + trace_hardirqs_on(); \
If you have both this and lockdep enabled, then this has to be called
regardless if tracing is enabled or not. So this should be:
if (IS_ENABLED(CONFIG_PROVE_LOCKING) || \
tracepoint_enabled(irq_enable))
> raw_local_irq_enable(); \
> } while (0)
>
> @@ -207,28 +212,32 @@ extern void warn_bogus_irq_restore(void);
> do { \
> bool was_disabled = raw_irqs_disabled();\
> raw_local_irq_disable(); \
> - if (!was_disabled) \
> + if (tracepoint_enabled(irq_disable) && \
> + !was_disabled) \
And this should be:
if (IS_ENABLED(CONFIG_PROVE_LOCKING) || \
(tracepoint_enabled(irq_disable) && \
!was_disabled))
> trace_hardirqs_off(); \
> } while (0)
>
> #define local_irq_save(flags) \
> do { \
> raw_local_irq_save(flags); \
> - if (!raw_irqs_disabled_flags(flags)) \
> + if (tracepoint_enabled(irq_disable) && \
> + !raw_irqs_disabled_flags(flags)) \
> trace_hardirqs_off(); \
> } while (0)
>
> #define local_irq_restore(flags) \
> do { \
> - if (!raw_irqs_disabled_flags(flags)) \
> + if (tracepoint_enabled(irq_enable) && \
> + !raw_irqs_disabled_flags(flags)) \
> trace_hardirqs_on(); \
Same with these.
-- Steve
> raw_local_irq_restore(flags); \
> } while (0)
>
> -#define safe_halt() \
> - do { \
> - trace_hardirqs_on(); \
> - raw_safe_halt(); \
> +#define safe_halt() \
> + do { \
> + if (tracepoint_enabled(irq_enable)) \
> + trace_hardirqs_on(); \
> + raw_safe_halt(); \
> } while (0)
>
>
> diff --git a/kernel/trace/trace_preemptirq.c b/kernel/trace/trace_preemptirq.c
> index 0c42b15c3800..90ee65db4516 100644
> --- a/kernel/trace/trace_preemptirq.c
> +++ b/kernel/trace/trace_preemptirq.c
> @@ -111,6 +111,9 @@ void trace_hardirqs_off(void)
> }
> EXPORT_SYMBOL(trace_hardirqs_off);
> NOKPROBE_SYMBOL(trace_hardirqs_off);
> +
> +EXPORT_TRACEPOINT_SYMBOL(irq_disable);
> +EXPORT_TRACEPOINT_SYMBOL(irq_enable);
> #endif /* CONFIG_TRACE_IRQFLAGS */
>
> #ifdef CONFIG_TRACE_PREEMPT_TOGGLE
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/2] tracing/preemptirq: Optimize preempt_disable/enable() tracepoint overhead
2025-06-26 14:20 ` [PATCH 2/2] tracing/preemptirq: Optimize preempt_disable/enable() tracepoint overhead Wander Lairson Costa
@ 2025-06-27 21:59 ` kernel test robot
2025-06-28 14:39 ` kernel test robot
1 sibling, 0 replies; 7+ messages in thread
From: kernel test robot @ 2025-06-27 21:59 UTC (permalink / raw)
To: Wander Lairson Costa, Ingo Molnar, Peter Zijlstra, Juri Lelli,
Vincent Guittot, Dietmar Eggemann, Steven Rostedt, Ben Segall,
Mel Gorman, Valentin Schneider, Masami Hiramatsu,
Mathieu Desnoyers, Thomas Gleixner, Boqun Feng, David Woodhouse,
linux-kernel, linux-trace-kernel
Cc: llvm, oe-kbuild-all, Arnaldo Carvalho de Melo, Clark Williams,
Gabriele Monaco
Hi Wander,
kernel test robot noticed the following build errors:
[auto build test ERROR on trace/for-next]
[also build test ERROR on tip/sched/core linus/master v6.16-rc3 next-20250627]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Wander-Lairson-Costa/trace-preemptirq-reduce-overhead-of-irq_enable-disable-tracepoints/20250626-222438
base: https://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace for-next
patch link: https://lore.kernel.org/r/20250626142017.26372-3-wander%40redhat.com
patch subject: [PATCH 2/2] tracing/preemptirq: Optimize preempt_disable/enable() tracepoint overhead
config: powerpc-randconfig-002-20250628 (https://download.01.org/0day-ci/archive/20250628/202506280524.R4BJehMT-lkp@intel.com/config)
compiler: clang version 19.1.7 (https://github.com/llvm/llvm-project cd708029e0b2869e80abe31ddb175f7c35361f90)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250628/202506280524.R4BJehMT-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202506280524.R4BJehMT-lkp@intel.com/
All errors (new ones prefixed by >>):
In file included from arch/powerpc/kernel/asm-offsets.c:12:
In file included from include/linux/compat.h:14:
In file included from include/linux/sem.h:5:
In file included from include/uapi/linux/sem.h:5:
In file included from include/linux/ipc.h:7:
In file included from include/linux/rhashtable-types.h:12:
In file included from include/linux/alloc_tag.h:11:
In file included from include/linux/preempt.h:13:
In file included from include/linux/tracepoint-defs.h:11:
In file included from include/linux/atomic.h:7:
In file included from arch/powerpc/include/asm/atomic.h:11:
In file included from arch/powerpc/include/asm/cmpxchg.h:755:
In file included from include/asm-generic/cmpxchg-local.h:6:
>> include/linux/irqflags.h:201:1: error: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int]
201 | DECLARE_TRACEPOINT(irq_enable);
| ^
| int
>> include/linux/irqflags.h:201:20: error: a parameter list without types is only allowed in a function definition
201 | DECLARE_TRACEPOINT(irq_enable);
| ^
include/linux/irqflags.h:202:1: error: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int]
202 | DECLARE_TRACEPOINT(irq_disable);
| ^
| int
include/linux/irqflags.h:202:20: error: a parameter list without types is only allowed in a function definition
202 | DECLARE_TRACEPOINT(irq_disable);
| ^
>> include/linux/irqflags.h:274:47: error: call to undeclared function 'tracepoint_enabled'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
274 | DEFINE_LOCK_GUARD_0(irq, local_irq_disable(), local_irq_enable())
| ^
include/linux/irqflags.h:206:7: note: expanded from macro 'local_irq_enable'
206 | if (tracepoint_enabled(irq_enable)) \
| ^
>> include/linux/irqflags.h:274:47: error: use of undeclared identifier 'irq_enable'
include/linux/irqflags.h:206:26: note: expanded from macro 'local_irq_enable'
206 | if (tracepoint_enabled(irq_enable)) \
| ^
>> include/linux/irqflags.h:274:47: error: use of undeclared identifier 'irq_enable'
include/linux/irqflags.h:206:26: note: expanded from macro 'local_irq_enable'
206 | if (tracepoint_enabled(irq_enable)) \
| ^
>> include/linux/irqflags.h:274:47: error: use of undeclared identifier 'irq_enable'
include/linux/irqflags.h:206:26: note: expanded from macro 'local_irq_enable'
206 | if (tracepoint_enabled(irq_enable)) \
| ^
include/linux/irqflags.h:274:26: error: call to undeclared function 'tracepoint_enabled'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
274 | DEFINE_LOCK_GUARD_0(irq, local_irq_disable(), local_irq_enable())
| ^
include/linux/irqflags.h:215:7: note: expanded from macro 'local_irq_disable'
215 | if (tracepoint_enabled(irq_disable) && \
| ^
>> include/linux/irqflags.h:274:26: error: use of undeclared identifier 'irq_disable'; did you mean 'was_disabled'?
include/linux/irqflags.h:215:26: note: expanded from macro 'local_irq_disable'
215 | if (tracepoint_enabled(irq_disable) && \
| ^
include/linux/irqflags.h:274:26: note: 'was_disabled' declared here
include/linux/irqflags.h:213:8: note: expanded from macro 'local_irq_disable'
213 | bool was_disabled = raw_irqs_disabled();\
| ^
>> include/linux/irqflags.h:274:26: error: use of undeclared identifier 'irq_disable'; did you mean 'was_disabled'?
274 | DEFINE_LOCK_GUARD_0(irq, local_irq_disable(), local_irq_enable())
| ^
include/linux/irqflags.h:215:26: note: expanded from macro 'local_irq_disable'
215 | if (tracepoint_enabled(irq_disable) && \
| ^
include/linux/irqflags.h:274:26: note: 'was_disabled' declared here
include/linux/irqflags.h:213:8: note: expanded from macro 'local_irq_disable'
213 | bool was_disabled = raw_irqs_disabled();\
| ^
>> include/linux/irqflags.h:274:26: error: use of undeclared identifier 'irq_disable'; did you mean 'was_disabled'?
274 | DEFINE_LOCK_GUARD_0(irq, local_irq_disable(), local_irq_enable())
| ^
include/linux/irqflags.h:215:26: note: expanded from macro 'local_irq_disable'
215 | if (tracepoint_enabled(irq_disable) && \
| ^
include/linux/irqflags.h:274:26: note: 'was_disabled' declared here
include/linux/irqflags.h:213:8: note: expanded from macro 'local_irq_disable'
213 | bool was_disabled = raw_irqs_disabled();\
| ^
include/linux/irqflags.h:277:7: error: call to undeclared function 'tracepoint_enabled'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
277 | local_irq_restore(_T->flags),
| ^
include/linux/irqflags.h:230:7: note: expanded from macro 'local_irq_restore'
230 | if (tracepoint_enabled(irq_enable) && \
| ^
include/linux/irqflags.h:277:7: error: use of undeclared identifier 'irq_enable'
include/linux/irqflags.h:230:26: note: expanded from macro 'local_irq_restore'
230 | if (tracepoint_enabled(irq_enable) && \
| ^
include/linux/irqflags.h:277:7: error: use of undeclared identifier 'irq_enable'
include/linux/irqflags.h:230:26: note: expanded from macro 'local_irq_restore'
230 | if (tracepoint_enabled(irq_enable) && \
| ^
include/linux/irqflags.h:277:7: error: use of undeclared identifier 'irq_enable'
include/linux/irqflags.h:230:26: note: expanded from macro 'local_irq_restore'
230 | if (tracepoint_enabled(irq_enable) && \
| ^
include/linux/irqflags.h:276:7: error: call to undeclared function 'tracepoint_enabled'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
276 | local_irq_save(_T->flags),
| ^
include/linux/irqflags.h:223:7: note: expanded from macro 'local_irq_save'
223 | if (tracepoint_enabled(irq_disable) && \
| ^
include/linux/irqflags.h:276:7: error: use of undeclared identifier 'irq_disable'
include/linux/irqflags.h:223:26: note: expanded from macro 'local_irq_save'
223 | if (tracepoint_enabled(irq_disable) && \
| ^
include/linux/irqflags.h:276:7: error: use of undeclared identifier 'irq_disable'
include/linux/irqflags.h:223:26: note: expanded from macro 'local_irq_save'
223 | if (tracepoint_enabled(irq_disable) && \
| ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make[3]: *** [scripts/Makefile.build:98: arch/powerpc/kernel/asm-offsets.s] Error 1 shuffle=1905180499
make[3]: Target 'prepare' not remade because of errors.
make[2]: *** [Makefile:1274: prepare0] Error 2 shuffle=1905180499
make[2]: Target 'prepare' not remade because of errors.
make[1]: *** [Makefile:248: __sub-make] Error 2 shuffle=1905180499
make[1]: Target 'prepare' not remade because of errors.
make: *** [Makefile:248: __sub-make] Error 2 shuffle=1905180499
make: Target 'prepare' not remade because of errors.
vim +/tracepoint_enabled +274 include/linux/irqflags.h
00b0ed2d4997af6 Peter Zijlstra 2020-08-12 200
563d10fd41452f8 Wander Lairson Costa 2025-06-26 @201 DECLARE_TRACEPOINT(irq_enable);
563d10fd41452f8 Wander Lairson Costa 2025-06-26 @202 DECLARE_TRACEPOINT(irq_disable);
563d10fd41452f8 Wander Lairson Costa 2025-06-26 203
de30a2b355ea853 Ingo Molnar 2006-07-03 204 #define local_irq_enable() \
00b0ed2d4997af6 Peter Zijlstra 2020-08-12 205 do { \
563d10fd41452f8 Wander Lairson Costa 2025-06-26 @206 if (tracepoint_enabled(irq_enable)) \
00b0ed2d4997af6 Peter Zijlstra 2020-08-12 207 trace_hardirqs_on(); \
00b0ed2d4997af6 Peter Zijlstra 2020-08-12 208 raw_local_irq_enable(); \
00b0ed2d4997af6 Peter Zijlstra 2020-08-12 209 } while (0)
00b0ed2d4997af6 Peter Zijlstra 2020-08-12 210
de30a2b355ea853 Ingo Molnar 2006-07-03 211 #define local_irq_disable() \
00b0ed2d4997af6 Peter Zijlstra 2020-08-12 212 do { \
044d0d6de9f5019 Nicholas Piggin 2020-07-23 213 bool was_disabled = raw_irqs_disabled();\
00b0ed2d4997af6 Peter Zijlstra 2020-08-12 214 raw_local_irq_disable(); \
563d10fd41452f8 Wander Lairson Costa 2025-06-26 215 if (tracepoint_enabled(irq_disable) && \
563d10fd41452f8 Wander Lairson Costa 2025-06-26 216 !was_disabled) \
00b0ed2d4997af6 Peter Zijlstra 2020-08-12 217 trace_hardirqs_off(); \
00b0ed2d4997af6 Peter Zijlstra 2020-08-12 218 } while (0)
00b0ed2d4997af6 Peter Zijlstra 2020-08-12 219
de30a2b355ea853 Ingo Molnar 2006-07-03 220 #define local_irq_save(flags) \
3f307891ce0e7b0 Steven Rostedt 2008-07-25 221 do { \
3f307891ce0e7b0 Steven Rostedt 2008-07-25 222 raw_local_irq_save(flags); \
563d10fd41452f8 Wander Lairson Costa 2025-06-26 223 if (tracepoint_enabled(irq_disable) && \
563d10fd41452f8 Wander Lairson Costa 2025-06-26 224 !raw_irqs_disabled_flags(flags)) \
3f307891ce0e7b0 Steven Rostedt 2008-07-25 225 trace_hardirqs_off(); \
3f307891ce0e7b0 Steven Rostedt 2008-07-25 226 } while (0)
3f307891ce0e7b0 Steven Rostedt 2008-07-25 227
de30a2b355ea853 Ingo Molnar 2006-07-03 228 #define local_irq_restore(flags) \
de30a2b355ea853 Ingo Molnar 2006-07-03 229 do { \
563d10fd41452f8 Wander Lairson Costa 2025-06-26 230 if (tracepoint_enabled(irq_enable) && \
563d10fd41452f8 Wander Lairson Costa 2025-06-26 231 !raw_irqs_disabled_flags(flags)) \
de30a2b355ea853 Ingo Molnar 2006-07-03 232 trace_hardirqs_on(); \
de30a2b355ea853 Ingo Molnar 2006-07-03 233 raw_local_irq_restore(flags); \
de30a2b355ea853 Ingo Molnar 2006-07-03 234 } while (0)
de30a2b355ea853 Ingo Molnar 2006-07-03 235
df9ee29270c11db David Howells 2010-10-07 236 #define safe_halt() \
df9ee29270c11db David Howells 2010-10-07 237 do { \
563d10fd41452f8 Wander Lairson Costa 2025-06-26 238 if (tracepoint_enabled(irq_enable)) \
df9ee29270c11db David Howells 2010-10-07 239 trace_hardirqs_on(); \
df9ee29270c11db David Howells 2010-10-07 240 raw_safe_halt(); \
df9ee29270c11db David Howells 2010-10-07 241 } while (0)
df9ee29270c11db David Howells 2010-10-07 242
df9ee29270c11db David Howells 2010-10-07 243
db2dcb4f91d5fec Jan Beulich 2015-01-20 244 #else /* !CONFIG_TRACE_IRQFLAGS */
df9ee29270c11db David Howells 2010-10-07 245
df9ee29270c11db David Howells 2010-10-07 246 #define local_irq_enable() do { raw_local_irq_enable(); } while (0)
df9ee29270c11db David Howells 2010-10-07 247 #define local_irq_disable() do { raw_local_irq_disable(); } while (0)
00b0ed2d4997af6 Peter Zijlstra 2020-08-12 248 #define local_irq_save(flags) do { raw_local_irq_save(flags); } while (0)
df9ee29270c11db David Howells 2010-10-07 249 #define local_irq_restore(flags) do { raw_local_irq_restore(flags); } while (0)
df9ee29270c11db David Howells 2010-10-07 250 #define safe_halt() do { raw_safe_halt(); } while (0)
df9ee29270c11db David Howells 2010-10-07 251
db2dcb4f91d5fec Jan Beulich 2015-01-20 252 #endif /* CONFIG_TRACE_IRQFLAGS */
db2dcb4f91d5fec Jan Beulich 2015-01-20 253
db2dcb4f91d5fec Jan Beulich 2015-01-20 254 #define local_save_flags(flags) raw_local_save_flags(flags)
db2dcb4f91d5fec Jan Beulich 2015-01-20 255
db2dcb4f91d5fec Jan Beulich 2015-01-20 256 /*
db2dcb4f91d5fec Jan Beulich 2015-01-20 257 * Some architectures don't define arch_irqs_disabled(), so even if either
db2dcb4f91d5fec Jan Beulich 2015-01-20 258 * definition would be fine we need to use different ones for the time being
db2dcb4f91d5fec Jan Beulich 2015-01-20 259 * to avoid build issues.
db2dcb4f91d5fec Jan Beulich 2015-01-20 260 */
db2dcb4f91d5fec Jan Beulich 2015-01-20 261 #ifdef CONFIG_TRACE_IRQFLAGS_SUPPORT
db2dcb4f91d5fec Jan Beulich 2015-01-20 262 #define irqs_disabled() \
db2dcb4f91d5fec Jan Beulich 2015-01-20 263 ({ \
db2dcb4f91d5fec Jan Beulich 2015-01-20 264 unsigned long _flags; \
db2dcb4f91d5fec Jan Beulich 2015-01-20 265 raw_local_save_flags(_flags); \
db2dcb4f91d5fec Jan Beulich 2015-01-20 266 raw_irqs_disabled_flags(_flags); \
db2dcb4f91d5fec Jan Beulich 2015-01-20 267 })
db2dcb4f91d5fec Jan Beulich 2015-01-20 268 #else /* !CONFIG_TRACE_IRQFLAGS_SUPPORT */
db2dcb4f91d5fec Jan Beulich 2015-01-20 269 #define irqs_disabled() raw_irqs_disabled()
40b1f4e5113eafc Michael Neuling 2009-10-22 270 #endif /* CONFIG_TRACE_IRQFLAGS_SUPPORT */
de30a2b355ea853 Ingo Molnar 2006-07-03 271
db2dcb4f91d5fec Jan Beulich 2015-01-20 272 #define irqs_disabled_flags(flags) raw_irqs_disabled_flags(flags)
db2dcb4f91d5fec Jan Beulich 2015-01-20 273
54da6a0924311c7 Peter Zijlstra 2023-05-26 @274 DEFINE_LOCK_GUARD_0(irq, local_irq_disable(), local_irq_enable())
54da6a0924311c7 Peter Zijlstra 2023-05-26 275 DEFINE_LOCK_GUARD_0(irqsave,
54da6a0924311c7 Peter Zijlstra 2023-05-26 276 local_irq_save(_T->flags),
54da6a0924311c7 Peter Zijlstra 2023-05-26 277 local_irq_restore(_T->flags),
54da6a0924311c7 Peter Zijlstra 2023-05-26 278 unsigned long flags)
54da6a0924311c7 Peter Zijlstra 2023-05-26 279
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] trace/preemptirq: reduce overhead of irq_enable/disable tracepoints
2025-06-26 14:20 ` [PATCH 1/2] trace/preemptirq: reduce overhead of irq_enable/disable tracepoints Wander Lairson Costa
2025-06-26 23:08 ` Steven Rostedt
@ 2025-06-27 22:10 ` kernel test robot
1 sibling, 0 replies; 7+ messages in thread
From: kernel test robot @ 2025-06-27 22:10 UTC (permalink / raw)
To: Wander Lairson Costa, Ingo Molnar, Peter Zijlstra, Juri Lelli,
Vincent Guittot, Dietmar Eggemann, Steven Rostedt, Ben Segall,
Mel Gorman, Valentin Schneider, Masami Hiramatsu,
Mathieu Desnoyers, Boqun Feng, David Woodhouse, Thomas Gleixner,
linux-kernel, linux-trace-kernel
Cc: oe-kbuild-all, Arnaldo Carvalho de Melo, Clark Williams,
Gabriele Monaco
Hi Wander,
kernel test robot noticed the following build errors:
[auto build test ERROR on trace/for-next]
[also build test ERROR on tip/sched/core linus/master v6.16-rc3 next-20250627]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Wander-Lairson-Costa/trace-preemptirq-reduce-overhead-of-irq_enable-disable-tracepoints/20250626-222438
base: https://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace for-next
patch link: https://lore.kernel.org/r/20250626142017.26372-2-wander%40redhat.com
patch subject: [PATCH 1/2] trace/preemptirq: reduce overhead of irq_enable/disable tracepoints
config: parisc-randconfig-001-20250628 (https://download.01.org/0day-ci/archive/20250628/202506280530.WX885a04-lkp@intel.com/config)
compiler: hppa-linux-gcc (GCC) 8.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250628/202506280530.WX885a04-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202506280530.WX885a04-lkp@intel.com/
All error/warnings (new ones prefixed by >>):
from include/linux/page-flags.h:10,
from kernel/bounds.c:10:
include/linux/jump_label.h:299:19: error: implicit declaration of function 'atomic_try_cmpxchg'; did you mean 'raw_cpu_try_cmpxchg'? [-Werror=implicit-function-declaration]
} while (!likely(atomic_try_cmpxchg(&key->enabled, &v, v + 1)));
^~~~~~~~~~~~~~~~~~
include/linux/compiler.h:76:40: note: in definition of macro 'likely'
# define likely(x) __builtin_expect(!!(x), 1)
^
In file included from include/linux/static_key.h:1,
from include/linux/tracepoint-defs.h:12,
from include/linux/irqflags.h:20,
from include/asm-generic/cmpxchg-local.h:6,
from arch/parisc/include/asm/cmpxchg.h:87,
from arch/parisc/include/asm/atomic.h:10,
from include/linux/atomic.h:7,
from arch/parisc/include/asm/bitops.h:13,
from include/linux/bitops.h:68,
from include/linux/kernel.h:23,
from arch/parisc/include/asm/bug.h:5,
from include/linux/bug.h:5,
from include/linux/page-flags.h:10,
from kernel/bounds.c:10:
include/linux/jump_label.h: In function 'static_key_slow_dec':
include/linux/jump_label.h:307:2: error: implicit declaration of function 'atomic_dec' [-Werror=implicit-function-declaration]
atomic_dec(&key->enabled);
^~~~~~~~~~
include/linux/jump_label.h: In function 'static_key_enable':
include/linux/jump_label.h:326:3: error: implicit declaration of function 'WARN_ON_ONCE'; did you mean 'WRITE_ONCE'? [-Werror=implicit-function-declaration]
WARN_ON_ONCE(atomic_read(&key->enabled) != 1);
^~~~~~~~~~~~
WRITE_ONCE
include/linux/jump_label.h:329:2: error: implicit declaration of function 'atomic_set'; did you mean 'static_assert'? [-Werror=implicit-function-declaration]
atomic_set(&key->enabled, 1);
^~~~~~~~~~
static_assert
In file included from include/linux/atomic.h:80,
from arch/parisc/include/asm/bitops.h:13,
from include/linux/bitops.h:68,
from include/linux/kernel.h:23,
from arch/parisc/include/asm/bug.h:5,
from include/linux/bug.h:5,
from include/linux/page-flags.h:10,
from kernel/bounds.c:10:
include/linux/atomic/atomic-arch-fallback.h: At top level:
include/linux/atomic/atomic-arch-fallback.h:455:1: error: static declaration of 'raw_atomic_read' follows non-static declaration
raw_atomic_read(const atomic_t *v)
^~~~~~~~~~~~~~~
In file included from include/linux/static_key.h:1,
from include/linux/tracepoint-defs.h:12,
from include/linux/irqflags.h:20,
from include/asm-generic/cmpxchg-local.h:6,
from arch/parisc/include/asm/cmpxchg.h:87,
from arch/parisc/include/asm/atomic.h:10,
from include/linux/atomic.h:7,
from arch/parisc/include/asm/bitops.h:13,
from include/linux/bitops.h:68,
from include/linux/kernel.h:23,
from arch/parisc/include/asm/bug.h:5,
from include/linux/bug.h:5,
from include/linux/page-flags.h:10,
from kernel/bounds.c:10:
include/linux/jump_label.h:262:9: note: previous implicit declaration of 'raw_atomic_read' was here
return raw_atomic_read(&key->enabled);
^~~~~~~~~~~~~~~
In file included from include/linux/atomic.h:82,
from arch/parisc/include/asm/bitops.h:13,
from include/linux/bitops.h:68,
from include/linux/kernel.h:23,
from arch/parisc/include/asm/bug.h:5,
from include/linux/bug.h:5,
from include/linux/page-flags.h:10,
from kernel/bounds.c:10:
include/linux/atomic/atomic-instrumented.h:30:1: error: static declaration of 'atomic_read' follows non-static declaration
atomic_read(const atomic_t *v)
^~~~~~~~~~~
In file included from include/linux/static_key.h:1,
from include/linux/tracepoint-defs.h:12,
from include/linux/irqflags.h:20,
from include/asm-generic/cmpxchg-local.h:6,
from arch/parisc/include/asm/cmpxchg.h:87,
from arch/parisc/include/asm/atomic.h:10,
from include/linux/atomic.h:7,
from arch/parisc/include/asm/bitops.h:13,
from include/linux/bitops.h:68,
from include/linux/kernel.h:23,
from arch/parisc/include/asm/bug.h:5,
from include/linux/bug.h:5,
from include/linux/page-flags.h:10,
from kernel/bounds.c:10:
include/linux/jump_label.h:295:6: note: previous implicit declaration of 'atomic_read' was here
v = atomic_read(&key->enabled);
^~~~~~~~~~~
In file included from include/linux/atomic.h:82,
from arch/parisc/include/asm/bitops.h:13,
from include/linux/bitops.h:68,
from include/linux/kernel.h:23,
from arch/parisc/include/asm/bug.h:5,
from include/linux/bug.h:5,
from include/linux/page-flags.h:10,
from kernel/bounds.c:10:
>> include/linux/atomic/atomic-instrumented.h:65:1: warning: conflicting types for 'atomic_set'
atomic_set(atomic_t *v, int i)
^~~~~~~~~~
include/linux/atomic/atomic-instrumented.h:65:1: error: static declaration of 'atomic_set' follows non-static declaration
In file included from include/linux/static_key.h:1,
from include/linux/tracepoint-defs.h:12,
from include/linux/irqflags.h:20,
from include/asm-generic/cmpxchg-local.h:6,
from arch/parisc/include/asm/cmpxchg.h:87,
from arch/parisc/include/asm/atomic.h:10,
from include/linux/atomic.h:7,
from arch/parisc/include/asm/bitops.h:13,
from include/linux/bitops.h:68,
from include/linux/kernel.h:23,
from arch/parisc/include/asm/bug.h:5,
from include/linux/bug.h:5,
from include/linux/page-flags.h:10,
from kernel/bounds.c:10:
include/linux/jump_label.h:329:2: note: previous implicit declaration of 'atomic_set' was here
atomic_set(&key->enabled, 1);
^~~~~~~~~~
In file included from include/linux/atomic.h:82,
from arch/parisc/include/asm/bitops.h:13,
from include/linux/bitops.h:68,
from include/linux/kernel.h:23,
from arch/parisc/include/asm/bug.h:5,
from include/linux/bug.h:5,
from include/linux/page-flags.h:10,
from kernel/bounds.c:10:
>> include/linux/atomic/atomic-instrumented.h:590:1: warning: conflicting types for 'atomic_dec'
atomic_dec(atomic_t *v)
^~~~~~~~~~
include/linux/atomic/atomic-instrumented.h:590:1: error: static declaration of 'atomic_dec' follows non-static declaration
In file included from include/linux/static_key.h:1,
from include/linux/tracepoint-defs.h:12,
from include/linux/irqflags.h:20,
from include/asm-generic/cmpxchg-local.h:6,
from arch/parisc/include/asm/cmpxchg.h:87,
from arch/parisc/include/asm/atomic.h:10,
from include/linux/atomic.h:7,
from arch/parisc/include/asm/bitops.h:13,
from include/linux/bitops.h:68,
from include/linux/kernel.h:23,
from arch/parisc/include/asm/bug.h:5,
from include/linux/bug.h:5,
from include/linux/page-flags.h:10,
from kernel/bounds.c:10:
include/linux/jump_label.h:307:2: note: previous implicit declaration of 'atomic_dec' was here
atomic_dec(&key->enabled);
^~~~~~~~~~
In file included from include/linux/atomic.h:82,
from arch/parisc/include/asm/bitops.h:13,
from include/linux/bitops.h:68,
from include/linux/kernel.h:23,
from arch/parisc/include/asm/bug.h:5,
from include/linux/bug.h:5,
from include/linux/page-flags.h:10,
from kernel/bounds.c:10:
>> include/linux/atomic/atomic-instrumented.h:1275:1: error: conflicting types for 'atomic_try_cmpxchg'
atomic_try_cmpxchg(atomic_t *v, int *old, int new)
^~~~~~~~~~~~~~~~~~
In file included from include/linux/array_size.h:5,
from include/linux/kernel.h:16,
from arch/parisc/include/asm/bug.h:5,
from include/linux/bug.h:5,
from include/linux/page-flags.h:10,
from kernel/bounds.c:10:
include/linux/jump_label.h:299:19: note: previous implicit declaration of 'atomic_try_cmpxchg' was here
} while (!likely(atomic_try_cmpxchg(&key->enabled, &v, v + 1)));
^~~~~~~~~~~~~~~~~~
include/linux/compiler.h:76:40: note: in definition of macro 'likely'
# define likely(x) __builtin_expect(!!(x), 1)
^
cc1: some warnings being treated as errors
make[3]: *** [scripts/Makefile.build:98: kernel/bounds.s] Error 1 shuffle=1288049444
make[3]: Target 'prepare' not remade because of errors.
make[2]: *** [Makefile:1274: prepare0] Error 2 shuffle=1288049444
make[2]: Target 'prepare' not remade because of errors.
make[1]: *** [Makefile:248: __sub-make] Error 2 shuffle=1288049444
make[1]: Target 'prepare' not remade because of errors.
make: *** [Makefile:248: __sub-make] Error 2 shuffle=1288049444
make: Target 'prepare' not remade because of errors.
vim +/atomic_try_cmpxchg +1275 include/linux/atomic/atomic-instrumented.h
aa525d063851a9 include/asm-generic/atomic-instrumented.h Mark Rutland 2018-09-04 1259
ad8110706f3811 include/linux/atomic/atomic-instrumented.h Mark Rutland 2023-06-05 1260 /**
ad8110706f3811 include/linux/atomic/atomic-instrumented.h Mark Rutland 2023-06-05 1261 * atomic_try_cmpxchg() - atomic compare and exchange with full ordering
ad8110706f3811 include/linux/atomic/atomic-instrumented.h Mark Rutland 2023-06-05 1262 * @v: pointer to atomic_t
ad8110706f3811 include/linux/atomic/atomic-instrumented.h Mark Rutland 2023-06-05 1263 * @old: pointer to int value to compare with
ad8110706f3811 include/linux/atomic/atomic-instrumented.h Mark Rutland 2023-06-05 1264 * @new: int value to assign
ad8110706f3811 include/linux/atomic/atomic-instrumented.h Mark Rutland 2023-06-05 1265 *
ad8110706f3811 include/linux/atomic/atomic-instrumented.h Mark Rutland 2023-06-05 1266 * If (@v == @old), atomically updates @v to @new with full ordering.
6dfee110c6cc7a include/linux/atomic/atomic-instrumented.h Mark Rutland 2024-02-09 1267 * Otherwise, @v is not modified, @old is updated to the current value of @v,
6dfee110c6cc7a include/linux/atomic/atomic-instrumented.h Mark Rutland 2024-02-09 1268 * and relaxed ordering is provided.
ad8110706f3811 include/linux/atomic/atomic-instrumented.h Mark Rutland 2023-06-05 1269 *
ad8110706f3811 include/linux/atomic/atomic-instrumented.h Mark Rutland 2023-06-05 1270 * Unsafe to use in noinstr code; use raw_atomic_try_cmpxchg() there.
ad8110706f3811 include/linux/atomic/atomic-instrumented.h Mark Rutland 2023-06-05 1271 *
ad8110706f3811 include/linux/atomic/atomic-instrumented.h Mark Rutland 2023-06-05 1272 * Return: @true if the exchange occured, @false otherwise.
ad8110706f3811 include/linux/atomic/atomic-instrumented.h Mark Rutland 2023-06-05 1273 */
c020395b6634b7 include/asm-generic/atomic-instrumented.h Marco Elver 2019-11-26 1274 static __always_inline bool
aa525d063851a9 include/asm-generic/atomic-instrumented.h Mark Rutland 2018-09-04 @1275 atomic_try_cmpxchg(atomic_t *v, int *old, int new)
aa525d063851a9 include/asm-generic/atomic-instrumented.h Mark Rutland 2018-09-04 1276 {
e87c4f6642f496 include/linux/atomic/atomic-instrumented.h Marco Elver 2021-11-30 1277 kcsan_mb();
3570a1bcf45e9a include/asm-generic/atomic-instrumented.h Marco Elver 2020-07-24 1278 instrument_atomic_read_write(v, sizeof(*v));
3570a1bcf45e9a include/asm-generic/atomic-instrumented.h Marco Elver 2020-07-24 1279 instrument_atomic_read_write(old, sizeof(*old));
c9268ac615f9f6 include/linux/atomic/atomic-instrumented.h Mark Rutland 2023-06-05 1280 return raw_atomic_try_cmpxchg(v, old, new);
aa525d063851a9 include/asm-generic/atomic-instrumented.h Mark Rutland 2018-09-04 1281 }
aa525d063851a9 include/asm-generic/atomic-instrumented.h Mark Rutland 2018-09-04 1282
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/2] tracing/preemptirq: Optimize preempt_disable/enable() tracepoint overhead
2025-06-26 14:20 ` [PATCH 2/2] tracing/preemptirq: Optimize preempt_disable/enable() tracepoint overhead Wander Lairson Costa
2025-06-27 21:59 ` kernel test robot
@ 2025-06-28 14:39 ` kernel test robot
1 sibling, 0 replies; 7+ messages in thread
From: kernel test robot @ 2025-06-28 14:39 UTC (permalink / raw)
To: Wander Lairson Costa, Ingo Molnar, Peter Zijlstra, Juri Lelli,
Vincent Guittot, Dietmar Eggemann, Steven Rostedt, Ben Segall,
Mel Gorman, Valentin Schneider, Masami Hiramatsu,
Mathieu Desnoyers, Thomas Gleixner, Boqun Feng, David Woodhouse,
linux-kernel, linux-trace-kernel
Cc: oe-kbuild-all, Arnaldo Carvalho de Melo, Clark Williams,
Gabriele Monaco
Hi Wander,
kernel test robot noticed the following build warnings:
[auto build test WARNING on trace/for-next]
[also build test WARNING on tip/sched/core linus/master v6.16-rc3 next-20250627]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Wander-Lairson-Costa/trace-preemptirq-reduce-overhead-of-irq_enable-disable-tracepoints/20250626-222438
base: https://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace for-next
patch link: https://lore.kernel.org/r/20250626142017.26372-3-wander%40redhat.com
patch subject: [PATCH 2/2] tracing/preemptirq: Optimize preempt_disable/enable() tracepoint overhead
config: sparc64-randconfig-001-20250628 (https://download.01.org/0day-ci/archive/20250628/202506282232.13AjjGxr-lkp@intel.com/config)
compiler: sparc64-linux-gcc (GCC) 8.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250628/202506282232.13AjjGxr-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202506282232.13AjjGxr-lkp@intel.com/
All warnings (new ones prefixed by >>):
In file included from include/asm-generic/cmpxchg-local.h:6,
from arch/sparc/include/asm/cmpxchg_64.h:111,
from arch/sparc/include/asm/cmpxchg.h:5,
from arch/sparc/include/asm/atomic_64.h:12,
from arch/sparc/include/asm/atomic.h:5,
from include/linux/atomic.h:7,
from include/linux/tracepoint-defs.h:11,
from include/linux/preempt.h:13,
from include/linux/spinlock.h:56,
from include/linux/mmzone.h:8,
from include/linux/gfp.h:7,
from include/linux/slab.h:16,
from kernel/resource.c:17:
include/linux/irqflags.h:201:1: warning: data definition has no type or storage class
DECLARE_TRACEPOINT(irq_enable);
^~~~~~~~~~~~~~~~~~
include/linux/irqflags.h:201:1: error: type defaults to 'int' in declaration of 'DECLARE_TRACEPOINT' [-Werror=implicit-int]
>> include/linux/irqflags.h:201:1: warning: parameter names (without types) in function declaration
include/linux/irqflags.h:202:1: warning: data definition has no type or storage class
DECLARE_TRACEPOINT(irq_disable);
^~~~~~~~~~~~~~~~~~
include/linux/irqflags.h:202:1: error: type defaults to 'int' in declaration of 'DECLARE_TRACEPOINT' [-Werror=implicit-int]
include/linux/irqflags.h:202:1: warning: parameter names (without types) in function declaration
In file included from include/linux/preempt.h:11,
from include/linux/spinlock.h:56,
from include/linux/mmzone.h:8,
from include/linux/gfp.h:7,
from include/linux/slab.h:16,
from kernel/resource.c:17:
include/linux/irqflags.h: In function 'class_irq_destructor':
include/linux/irqflags.h:206:7: error: implicit declaration of function 'tracepoint_enabled'; did you mean 'local_irq_enable'? [-Werror=implicit-function-declaration]
if (tracepoint_enabled(irq_enable)) \
^~~~~~~~~~~~~~~~~~
include/linux/cleanup.h:385:18: note: in definition of macro '__DEFINE_UNLOCK_GUARD'
if (_T->lock) { _unlock; } \
^~~~~~~
include/linux/irqflags.h:274:1: note: in expansion of macro 'DEFINE_LOCK_GUARD_0'
DEFINE_LOCK_GUARD_0(irq, local_irq_disable(), local_irq_enable())
^~~~~~~~~~~~~~~~~~~
include/linux/irqflags.h:274:47: note: in expansion of macro 'local_irq_enable'
DEFINE_LOCK_GUARD_0(irq, local_irq_disable(), local_irq_enable())
^~~~~~~~~~~~~~~~
include/linux/irqflags.h:206:26: error: 'irq_enable' undeclared (first use in this function); did you mean 'irqs_disabled'?
if (tracepoint_enabled(irq_enable)) \
^~~~~~~~~~
include/linux/cleanup.h:385:18: note: in definition of macro '__DEFINE_UNLOCK_GUARD'
if (_T->lock) { _unlock; } \
^~~~~~~
include/linux/irqflags.h:274:1: note: in expansion of macro 'DEFINE_LOCK_GUARD_0'
DEFINE_LOCK_GUARD_0(irq, local_irq_disable(), local_irq_enable())
^~~~~~~~~~~~~~~~~~~
include/linux/irqflags.h:274:47: note: in expansion of macro 'local_irq_enable'
DEFINE_LOCK_GUARD_0(irq, local_irq_disable(), local_irq_enable())
^~~~~~~~~~~~~~~~
include/linux/irqflags.h:206:26: note: each undeclared identifier is reported only once for each function it appears in
if (tracepoint_enabled(irq_enable)) \
^~~~~~~~~~
include/linux/cleanup.h:385:18: note: in definition of macro '__DEFINE_UNLOCK_GUARD'
if (_T->lock) { _unlock; } \
^~~~~~~
include/linux/irqflags.h:274:1: note: in expansion of macro 'DEFINE_LOCK_GUARD_0'
DEFINE_LOCK_GUARD_0(irq, local_irq_disable(), local_irq_enable())
^~~~~~~~~~~~~~~~~~~
include/linux/irqflags.h:274:47: note: in expansion of macro 'local_irq_enable'
DEFINE_LOCK_GUARD_0(irq, local_irq_disable(), local_irq_enable())
^~~~~~~~~~~~~~~~
include/linux/irqflags.h: In function 'class_irq_constructor':
include/linux/irqflags.h:215:26: error: 'irq_disable' undeclared (first use in this function); did you mean 'irqs_disabled'?
if (tracepoint_enabled(irq_disable) && \
^~~~~~~~~~~
include/linux/cleanup.h:403:2: note: in definition of macro '__DEFINE_LOCK_GUARD_0'
_lock; \
^~~~~
include/linux/irqflags.h:274:1: note: in expansion of macro 'DEFINE_LOCK_GUARD_0'
DEFINE_LOCK_GUARD_0(irq, local_irq_disable(), local_irq_enable())
^~~~~~~~~~~~~~~~~~~
include/linux/irqflags.h:274:26: note: in expansion of macro 'local_irq_disable'
DEFINE_LOCK_GUARD_0(irq, local_irq_disable(), local_irq_enable())
^~~~~~~~~~~~~~~~~
include/linux/irqflags.h: In function 'class_irqsave_destructor':
include/linux/irqflags.h:230:26: error: 'irq_enable' undeclared (first use in this function); did you mean 'irqs_disabled'?
if (tracepoint_enabled(irq_enable) && \
^~~~~~~~~~
include/linux/cleanup.h:385:18: note: in definition of macro '__DEFINE_UNLOCK_GUARD'
if (_T->lock) { _unlock; } \
^~~~~~~
include/linux/irqflags.h:275:1: note: in expansion of macro 'DEFINE_LOCK_GUARD_0'
DEFINE_LOCK_GUARD_0(irqsave,
^~~~~~~~~~~~~~~~~~~
include/linux/irqflags.h:277:7: note: in expansion of macro 'local_irq_restore'
local_irq_restore(_T->flags),
^~~~~~~~~~~~~~~~~
include/linux/irqflags.h: In function 'class_irqsave_constructor':
include/linux/irqflags.h:223:26: error: 'irq_disable' undeclared (first use in this function); did you mean 'irqs_disabled'?
if (tracepoint_enabled(irq_disable) && \
^~~~~~~~~~~
include/linux/cleanup.h:403:2: note: in definition of macro '__DEFINE_LOCK_GUARD_0'
_lock; \
^~~~~
include/linux/irqflags.h:275:1: note: in expansion of macro 'DEFINE_LOCK_GUARD_0'
DEFINE_LOCK_GUARD_0(irqsave,
^~~~~~~~~~~~~~~~~~~
include/linux/irqflags.h:276:7: note: in expansion of macro 'local_irq_save'
local_irq_save(_T->flags),
^~~~~~~~~~~~~~
In file included from include/linux/static_key.h:1,
from include/linux/tracepoint-defs.h:12,
from include/linux/preempt.h:13,
from include/linux/spinlock.h:56,
from include/linux/mmzone.h:8,
from include/linux/gfp.h:7,
from include/linux/slab.h:16,
from kernel/resource.c:17:
include/linux/spinlock_api_smp.h: In function '__raw_spin_lock_irqsave':
include/linux/tracepoint-defs.h:92:27: error: '__tracepoint_irq_disable' undeclared (first use in this function); did you mean 'raw_local_irq_disable'?
static_branch_unlikely(&(__tracepoint_##tp).key)
^~~~~~~~~~~~~
include/linux/jump_label.h:503:43: note: in definition of macro 'static_branch_unlikely'
--
In file included from include/asm-generic/cmpxchg-local.h:6,
from arch/sparc/include/asm/cmpxchg_64.h:111,
from arch/sparc/include/asm/cmpxchg.h:5,
from arch/sparc/include/asm/atomic_64.h:12,
from arch/sparc/include/asm/atomic.h:5,
from include/linux/atomic.h:7,
from include/linux/tracepoint-defs.h:11,
from include/linux/preempt.h:13,
from include/linux/spinlock.h:56,
from include/linux/mmzone.h:8,
from include/linux/gfp.h:7,
from include/linux/slab.h:16,
from kernel/fork.c:16:
include/linux/irqflags.h:201:1: warning: data definition has no type or storage class
DECLARE_TRACEPOINT(irq_enable);
^~~~~~~~~~~~~~~~~~
include/linux/irqflags.h:201:1: error: type defaults to 'int' in declaration of 'DECLARE_TRACEPOINT' [-Werror=implicit-int]
>> include/linux/irqflags.h:201:1: warning: parameter names (without types) in function declaration
include/linux/irqflags.h:202:1: warning: data definition has no type or storage class
DECLARE_TRACEPOINT(irq_disable);
^~~~~~~~~~~~~~~~~~
include/linux/irqflags.h:202:1: error: type defaults to 'int' in declaration of 'DECLARE_TRACEPOINT' [-Werror=implicit-int]
include/linux/irqflags.h:202:1: warning: parameter names (without types) in function declaration
In file included from include/linux/preempt.h:11,
from include/linux/spinlock.h:56,
from include/linux/mmzone.h:8,
from include/linux/gfp.h:7,
from include/linux/slab.h:16,
from kernel/fork.c:16:
include/linux/irqflags.h: In function 'class_irq_destructor':
include/linux/irqflags.h:206:7: error: implicit declaration of function 'tracepoint_enabled'; did you mean 'local_irq_enable'? [-Werror=implicit-function-declaration]
if (tracepoint_enabled(irq_enable)) \
^~~~~~~~~~~~~~~~~~
include/linux/cleanup.h:385:18: note: in definition of macro '__DEFINE_UNLOCK_GUARD'
if (_T->lock) { _unlock; } \
^~~~~~~
include/linux/irqflags.h:274:1: note: in expansion of macro 'DEFINE_LOCK_GUARD_0'
DEFINE_LOCK_GUARD_0(irq, local_irq_disable(), local_irq_enable())
^~~~~~~~~~~~~~~~~~~
include/linux/irqflags.h:274:47: note: in expansion of macro 'local_irq_enable'
DEFINE_LOCK_GUARD_0(irq, local_irq_disable(), local_irq_enable())
^~~~~~~~~~~~~~~~
include/linux/irqflags.h:206:26: error: 'irq_enable' undeclared (first use in this function); did you mean 'irqs_disabled'?
if (tracepoint_enabled(irq_enable)) \
^~~~~~~~~~
include/linux/cleanup.h:385:18: note: in definition of macro '__DEFINE_UNLOCK_GUARD'
if (_T->lock) { _unlock; } \
^~~~~~~
include/linux/irqflags.h:274:1: note: in expansion of macro 'DEFINE_LOCK_GUARD_0'
DEFINE_LOCK_GUARD_0(irq, local_irq_disable(), local_irq_enable())
^~~~~~~~~~~~~~~~~~~
include/linux/irqflags.h:274:47: note: in expansion of macro 'local_irq_enable'
DEFINE_LOCK_GUARD_0(irq, local_irq_disable(), local_irq_enable())
^~~~~~~~~~~~~~~~
include/linux/irqflags.h:206:26: note: each undeclared identifier is reported only once for each function it appears in
if (tracepoint_enabled(irq_enable)) \
^~~~~~~~~~
include/linux/cleanup.h:385:18: note: in definition of macro '__DEFINE_UNLOCK_GUARD'
if (_T->lock) { _unlock; } \
^~~~~~~
include/linux/irqflags.h:274:1: note: in expansion of macro 'DEFINE_LOCK_GUARD_0'
DEFINE_LOCK_GUARD_0(irq, local_irq_disable(), local_irq_enable())
^~~~~~~~~~~~~~~~~~~
include/linux/irqflags.h:274:47: note: in expansion of macro 'local_irq_enable'
DEFINE_LOCK_GUARD_0(irq, local_irq_disable(), local_irq_enable())
^~~~~~~~~~~~~~~~
include/linux/irqflags.h: In function 'class_irq_constructor':
include/linux/irqflags.h:215:26: error: 'irq_disable' undeclared (first use in this function); did you mean 'irqs_disabled'?
if (tracepoint_enabled(irq_disable) && \
^~~~~~~~~~~
include/linux/cleanup.h:403:2: note: in definition of macro '__DEFINE_LOCK_GUARD_0'
_lock; \
^~~~~
include/linux/irqflags.h:274:1: note: in expansion of macro 'DEFINE_LOCK_GUARD_0'
DEFINE_LOCK_GUARD_0(irq, local_irq_disable(), local_irq_enable())
^~~~~~~~~~~~~~~~~~~
include/linux/irqflags.h:274:26: note: in expansion of macro 'local_irq_disable'
DEFINE_LOCK_GUARD_0(irq, local_irq_disable(), local_irq_enable())
^~~~~~~~~~~~~~~~~
include/linux/irqflags.h: In function 'class_irqsave_destructor':
include/linux/irqflags.h:230:26: error: 'irq_enable' undeclared (first use in this function); did you mean 'irqs_disabled'?
if (tracepoint_enabled(irq_enable) && \
^~~~~~~~~~
include/linux/cleanup.h:385:18: note: in definition of macro '__DEFINE_UNLOCK_GUARD'
if (_T->lock) { _unlock; } \
^~~~~~~
include/linux/irqflags.h:275:1: note: in expansion of macro 'DEFINE_LOCK_GUARD_0'
DEFINE_LOCK_GUARD_0(irqsave,
^~~~~~~~~~~~~~~~~~~
include/linux/irqflags.h:277:7: note: in expansion of macro 'local_irq_restore'
local_irq_restore(_T->flags),
^~~~~~~~~~~~~~~~~
include/linux/irqflags.h: In function 'class_irqsave_constructor':
include/linux/irqflags.h:223:26: error: 'irq_disable' undeclared (first use in this function); did you mean 'irqs_disabled'?
if (tracepoint_enabled(irq_disable) && \
^~~~~~~~~~~
include/linux/cleanup.h:403:2: note: in definition of macro '__DEFINE_LOCK_GUARD_0'
_lock; \
^~~~~
include/linux/irqflags.h:275:1: note: in expansion of macro 'DEFINE_LOCK_GUARD_0'
DEFINE_LOCK_GUARD_0(irqsave,
^~~~~~~~~~~~~~~~~~~
include/linux/irqflags.h:276:7: note: in expansion of macro 'local_irq_save'
local_irq_save(_T->flags),
^~~~~~~~~~~~~~
In file included from include/linux/static_key.h:1,
from include/linux/tracepoint-defs.h:12,
from include/linux/preempt.h:13,
from include/linux/spinlock.h:56,
from include/linux/mmzone.h:8,
from include/linux/gfp.h:7,
from include/linux/slab.h:16,
from kernel/fork.c:16:
include/linux/spinlock_api_smp.h: In function '__raw_spin_lock_irqsave':
include/linux/tracepoint-defs.h:92:27: error: '__tracepoint_irq_disable' undeclared (first use in this function); did you mean 'raw_local_irq_disable'?
static_branch_unlikely(&(__tracepoint_##tp).key)
^~~~~~~~~~~~~
include/linux/jump_label.h:503:43: note: in definition of macro 'static_branch_unlikely'
--
In file included from include/asm-generic/cmpxchg-local.h:6,
from arch/sparc/include/asm/cmpxchg_64.h:111,
from arch/sparc/include/asm/cmpxchg.h:5,
from arch/sparc/include/asm/atomic_64.h:12,
from arch/sparc/include/asm/atomic.h:5,
from include/linux/atomic.h:7,
from include/linux/tracepoint-defs.h:11,
from include/linux/preempt.h:13,
from include/linux/alloc_tag.h:11,
from include/linux/rhashtable-types.h:12,
from include/linux/ipc.h:7,
from include/uapi/linux/sem.h:5,
from include/linux/sem.h:5,
from include/linux/compat.h:14,
from kernel/compat.c:12:
include/linux/irqflags.h:201:1: warning: data definition has no type or storage class
DECLARE_TRACEPOINT(irq_enable);
^~~~~~~~~~~~~~~~~~
include/linux/irqflags.h:201:1: error: type defaults to 'int' in declaration of 'DECLARE_TRACEPOINT' [-Werror=implicit-int]
>> include/linux/irqflags.h:201:1: warning: parameter names (without types) in function declaration
include/linux/irqflags.h:202:1: warning: data definition has no type or storage class
DECLARE_TRACEPOINT(irq_disable);
^~~~~~~~~~~~~~~~~~
include/linux/irqflags.h:202:1: error: type defaults to 'int' in declaration of 'DECLARE_TRACEPOINT' [-Werror=implicit-int]
include/linux/irqflags.h:202:1: warning: parameter names (without types) in function declaration
In file included from include/linux/jump_label.h:78,
from include/linux/dynamic_debug.h:6,
from include/linux/printk.h:616,
from include/asm-generic/bug.h:22,
from arch/sparc/include/asm/bug.h:25,
from include/linux/bug.h:5,
from include/linux/alloc_tag.h:8,
from include/linux/rhashtable-types.h:12,
from include/linux/ipc.h:7,
from include/uapi/linux/sem.h:5,
from include/linux/sem.h:5,
from include/linux/compat.h:14,
from kernel/compat.c:12:
include/linux/irqflags.h: In function 'class_irq_destructor':
include/linux/irqflags.h:206:7: error: implicit declaration of function 'tracepoint_enabled'; did you mean 'static_key_enabled'? [-Werror=implicit-function-declaration]
if (tracepoint_enabled(irq_enable)) \
^~~~~~~~~~~~~~~~~~
include/linux/cleanup.h:385:18: note: in definition of macro '__DEFINE_UNLOCK_GUARD'
if (_T->lock) { _unlock; } \
^~~~~~~
include/linux/irqflags.h:274:1: note: in expansion of macro 'DEFINE_LOCK_GUARD_0'
DEFINE_LOCK_GUARD_0(irq, local_irq_disable(), local_irq_enable())
^~~~~~~~~~~~~~~~~~~
include/linux/irqflags.h:274:47: note: in expansion of macro 'local_irq_enable'
DEFINE_LOCK_GUARD_0(irq, local_irq_disable(), local_irq_enable())
^~~~~~~~~~~~~~~~
include/linux/irqflags.h:206:26: error: 'irq_enable' undeclared (first use in this function); did you mean 'ctl_table'?
if (tracepoint_enabled(irq_enable)) \
^~~~~~~~~~
include/linux/cleanup.h:385:18: note: in definition of macro '__DEFINE_UNLOCK_GUARD'
if (_T->lock) { _unlock; } \
^~~~~~~
include/linux/irqflags.h:274:1: note: in expansion of macro 'DEFINE_LOCK_GUARD_0'
DEFINE_LOCK_GUARD_0(irq, local_irq_disable(), local_irq_enable())
^~~~~~~~~~~~~~~~~~~
include/linux/irqflags.h:274:47: note: in expansion of macro 'local_irq_enable'
DEFINE_LOCK_GUARD_0(irq, local_irq_disable(), local_irq_enable())
^~~~~~~~~~~~~~~~
include/linux/irqflags.h:206:26: note: each undeclared identifier is reported only once for each function it appears in
if (tracepoint_enabled(irq_enable)) \
^~~~~~~~~~
include/linux/cleanup.h:385:18: note: in definition of macro '__DEFINE_UNLOCK_GUARD'
if (_T->lock) { _unlock; } \
^~~~~~~
include/linux/irqflags.h:274:1: note: in expansion of macro 'DEFINE_LOCK_GUARD_0'
DEFINE_LOCK_GUARD_0(irq, local_irq_disable(), local_irq_enable())
^~~~~~~~~~~~~~~~~~~
include/linux/irqflags.h:274:47: note: in expansion of macro 'local_irq_enable'
DEFINE_LOCK_GUARD_0(irq, local_irq_disable(), local_irq_enable())
^~~~~~~~~~~~~~~~
include/linux/irqflags.h: In function 'class_irq_constructor':
include/linux/irqflags.h:215:26: error: 'irq_disable' undeclared (first use in this function); did you mean 'irqs_disabled'?
if (tracepoint_enabled(irq_disable) && \
^~~~~~~~~~~
include/linux/cleanup.h:403:2: note: in definition of macro '__DEFINE_LOCK_GUARD_0'
_lock; \
^~~~~
include/linux/irqflags.h:274:1: note: in expansion of macro 'DEFINE_LOCK_GUARD_0'
DEFINE_LOCK_GUARD_0(irq, local_irq_disable(), local_irq_enable())
^~~~~~~~~~~~~~~~~~~
include/linux/irqflags.h:274:26: note: in expansion of macro 'local_irq_disable'
DEFINE_LOCK_GUARD_0(irq, local_irq_disable(), local_irq_enable())
^~~~~~~~~~~~~~~~~
include/linux/irqflags.h: In function 'class_irqsave_destructor':
include/linux/irqflags.h:230:26: error: 'irq_enable' undeclared (first use in this function); did you mean 'ctl_table'?
if (tracepoint_enabled(irq_enable) && \
^~~~~~~~~~
include/linux/cleanup.h:385:18: note: in definition of macro '__DEFINE_UNLOCK_GUARD'
if (_T->lock) { _unlock; } \
^~~~~~~
include/linux/irqflags.h:275:1: note: in expansion of macro 'DEFINE_LOCK_GUARD_0'
DEFINE_LOCK_GUARD_0(irqsave,
^~~~~~~~~~~~~~~~~~~
include/linux/irqflags.h:277:7: note: in expansion of macro 'local_irq_restore'
local_irq_restore(_T->flags),
^~~~~~~~~~~~~~~~~
include/linux/irqflags.h: In function 'class_irqsave_constructor':
include/linux/irqflags.h:223:26: error: 'irq_disable' undeclared (first use in this function); did you mean 'irqs_disabled'?
if (tracepoint_enabled(irq_disable) && \
^~~~~~~~~~~
include/linux/cleanup.h:403:2: note: in definition of macro '__DEFINE_LOCK_GUARD_0'
_lock; \
^~~~~
include/linux/irqflags.h:275:1: note: in expansion of macro 'DEFINE_LOCK_GUARD_0'
DEFINE_LOCK_GUARD_0(irqsave,
^~~~~~~~~~~~~~~~~~~
include/linux/irqflags.h:276:7: note: in expansion of macro 'local_irq_save'
local_irq_save(_T->flags),
^~~~~~~~~~~~~~
In file included from include/linux/dynamic_debug.h:6,
from include/linux/printk.h:616,
from include/asm-generic/bug.h:22,
from arch/sparc/include/asm/bug.h:25,
from include/linux/bug.h:5,
from include/linux/alloc_tag.h:8,
..
vim +201 include/linux/irqflags.h
00b0ed2d4997af Peter Zijlstra 2020-08-12 200
563d10fd41452f Wander Lairson Costa 2025-06-26 @201 DECLARE_TRACEPOINT(irq_enable);
563d10fd41452f Wander Lairson Costa 2025-06-26 202 DECLARE_TRACEPOINT(irq_disable);
563d10fd41452f Wander Lairson Costa 2025-06-26 203
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2025-06-28 14:40 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-26 14:20 [PATCH 0/2] tracing/preemptirq: Optimize disabled tracepoint overhead Wander Lairson Costa
2025-06-26 14:20 ` [PATCH 1/2] trace/preemptirq: reduce overhead of irq_enable/disable tracepoints Wander Lairson Costa
2025-06-26 23:08 ` Steven Rostedt
2025-06-27 22:10 ` kernel test robot
2025-06-26 14:20 ` [PATCH 2/2] tracing/preemptirq: Optimize preempt_disable/enable() tracepoint overhead Wander Lairson Costa
2025-06-27 21:59 ` kernel test robot
2025-06-28 14:39 ` kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).