cpufreq: amd-pstate: Use trace_call__##name() at guarded tracepoint call site

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>
This commit is contained in:
Vineeth Pillai 2026-05-15 10:01:21 -04:00 committed by Steven Rostedt
parent b3efa3b2bb
commit 2dad375e5f

View 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;
}