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