]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
cpufreq: amd-pstate: Use trace_call__##name() at guarded tracepoint call site
authorVineeth Pillai <vineeth@bitbyteword.org>
Fri, 15 May 2026 14:01:21 +0000 (10:01 -0400)
committerSteven Rostedt <rostedt@goodmis.org>
Thu, 21 May 2026 22:03:07 +0000 (18:03 -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: Huang Rui <ray.huang@amd.com>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: Viresh Kumar <viresh.kumar@linaro.org>
Link: https://patch.msgid.link/20260515140121.2239414-1-vineeth@bitbyteword.org
Suggested-by: Steven Rostedt <rostedt@goodmis.org>
Suggested-by: Peter Zijlstra <peterz@infradead.org>
Assisted-by: Claude:claude-sonnet-4-6
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Vineeth Pillai (Google) <vineeth@bitbyteword.org>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
drivers/cpufreq/amd-pstate.c

index 453084c67327fdf00238683464a38db20f3e4316..4722de25149bfda78bb614bd5122027df4865414 100644 (file)
@@ -368,7 +368,8 @@ static int amd_pstate_set_floor_perf(struct cpufreq_policy *policy, u8 perf)
 
 out_trace:
        if (trace_amd_pstate_cppc_req2_enabled())
-               trace_amd_pstate_cppc_req2(cpudata->cpu, perf, changed, ret);
+               trace_call__amd_pstate_cppc_req2(cpudata->cpu, perf, changed,
+                                                ret);
        return ret;
 }