]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
kernel: Use trace_call__##name() at guarded tracepoint call sites
authorVineeth Pillai (Google) <vineeth@bitbyteword.org>
Mon, 23 Mar 2026 16:00:21 +0000 (12:00 -0400)
committerSteven Rostedt (Google) <rostedt@goodmis.org>
Thu, 26 Mar 2026 12:28:49 +0000 (08:28 -0400)
Replace trace_foo() with the new trace_call__foo() at sites already
guarded by trace_foo_enabled(), avoiding a redundant
static_branch_unlikely() re-evaluation inside the tracepoint.
trace_call__foo() calls the tracepoint callbacks directly without
utilizing the static branch again.

Cc: David Vernet <void@manifault.com>
Cc: Andrea Righi <arighi@nvidia.com>
Cc: Changwoo Min <changwoo@igalia.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Juri Lelli <juri.lelli@redhat.com>
Cc: Vincent Guittot <vincent.guittot@linaro.org>
Cc: Dietmar Eggemann <dietmar.eggemann@arm.com>
Cc: Ben Segall <bsegall@google.com>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Valentin Schneider <vschneid@redhat.com>
Cc: Thomas Gleixner <tglx@kernel.org>
Cc: "Yury Norov [NVIDIA]" <yury.norov@gmail.com>
Cc: "Paul E. McKenney" <paulmck@kernel.org>
Cc: Rik van Riel <riel@surriel.com>
Cc: Roman Kisel <romank@linux.microsoft.com>
Cc: Joel Fernandes <joelagnelf@nvidia.com>
Cc: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
Cc: Ulf Hansson <ulf.hansson@linaro.org>
Link: https://patch.msgid.link/20260323160052.17528-3-vineeth@bitbyteword.org
Suggested-by: Steven Rostedt <rostedt@goodmis.org>
Suggested-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Vineeth Pillai (Google) <vineeth@bitbyteword.org>
Assisted-by: Claude:claude-sonnet-4-6
Acked-by: Tejun Heo <tj@kernel.org>
Acked-by: Thomas Gleixner <tglx@kernel.org>
Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
kernel/irq_work.c
kernel/sched/ext.c
kernel/smp.c

index 73f7e1fd4ab4d9776744faf0e173d593567bf42f..120fd7365fbe2906ef4894f60afceebdf58c5b4b 100644 (file)
@@ -79,7 +79,7 @@ void __weak arch_irq_work_raise(void)
 static __always_inline void irq_work_raise(struct irq_work *work)
 {
        if (trace_ipi_send_cpu_enabled() && arch_irq_work_has_interrupt())
-               trace_ipi_send_cpu(smp_processor_id(), _RET_IP_, work->func);
+               trace_call__ipi_send_cpu(smp_processor_id(), _RET_IP_, work->func);
 
        arch_irq_work_raise();
 }
index 26a6ac2f88267797b317fae562cbad1ff50bb642..7da8be1b0f26cacd833b3ebf01385a650d39b88a 100644 (file)
@@ -4493,7 +4493,7 @@ static __printf(2, 3) void dump_line(struct seq_buf *s, const char *fmt, ...)
                vscnprintf(line_buf, sizeof(line_buf), fmt, args);
                va_end(args);
 
-               trace_sched_ext_dump(line_buf);
+               trace_call__sched_ext_dump(line_buf);
        }
 #endif
        /* @s may be zero sized and seq_buf triggers WARN if so */
index f349960f79cad961100899998da368e38df7f48e..537cf1f461d75db6a12cfb13ffe409ee8d460a1d 100644 (file)
@@ -394,7 +394,7 @@ void __smp_call_single_queue(int cpu, struct llist_node *node)
                func = CSD_TYPE(csd) == CSD_TYPE_TTWU ?
                        sched_ttwu_pending : csd->func;
 
-               trace_csd_queue_cpu(cpu, _RET_IP_, func, csd);
+               trace_call__csd_queue_cpu(cpu, _RET_IP_, func, csd);
        }
 
        /*