Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

cpufreq: Use trace_call__##name() at guarded tracepoint call sites

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: Mario Limonciello <mario.limonciello@amd.com>
Cc: Perry Yuan <perry.yuan@amd.com>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: Viresh Kumar <viresh.kumar@linaro.org>
Cc: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Cc: Len Brown <lenb@kernel.org>
Link: https://patch.msgid.link/20260323160052.17528-7-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: Rafael J. Wysocki (Intel) <rafael@kernel.org> # cpufreq core
Reviewed-by: Gautham R. Shenoy <gautham.shenoy@amd.com>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>

authored by

Vineeth Pillai (Google) and committed by
Steven Rostedt (Google)
ad8363eb 724d197a

+7 -7
+5 -5
drivers/cpufreq/amd-pstate.c
··· 247 247 if (trace_amd_pstate_epp_perf_enabled()) { 248 248 union perf_cached perf = READ_ONCE(cpudata->perf); 249 249 250 - trace_amd_pstate_epp_perf(cpudata->cpu, 250 + trace_call__amd_pstate_epp_perf(cpudata->cpu, 251 251 perf.highest_perf, 252 252 epp, 253 253 min_perf, ··· 298 298 if (trace_amd_pstate_epp_perf_enabled()) { 299 299 union perf_cached perf = cpudata->perf; 300 300 301 - trace_amd_pstate_epp_perf(cpudata->cpu, perf.highest_perf, 301 + trace_call__amd_pstate_epp_perf(cpudata->cpu, perf.highest_perf, 302 302 epp, 303 303 FIELD_GET(AMD_CPPC_MIN_PERF_MASK, 304 304 cpudata->cppc_req_cached), ··· 343 343 if (trace_amd_pstate_epp_perf_enabled()) { 344 344 union perf_cached perf = cpudata->perf; 345 345 346 - trace_amd_pstate_epp_perf(cpudata->cpu, perf.highest_perf, 346 + trace_call__amd_pstate_epp_perf(cpudata->cpu, perf.highest_perf, 347 347 epp, 348 348 FIELD_GET(AMD_CPPC_MIN_PERF_MASK, 349 349 cpudata->cppc_req_cached), ··· 507 507 if (trace_amd_pstate_epp_perf_enabled()) { 508 508 union perf_cached perf = READ_ONCE(cpudata->perf); 509 509 510 - trace_amd_pstate_epp_perf(cpudata->cpu, 510 + trace_call__amd_pstate_epp_perf(cpudata->cpu, 511 511 perf.highest_perf, 512 512 epp, 513 513 min_perf, ··· 588 588 } 589 589 590 590 if (trace_amd_pstate_perf_enabled() && amd_pstate_sample(cpudata)) { 591 - trace_amd_pstate_perf(min_perf, des_perf, max_perf, cpudata->freq, 591 + trace_call__amd_pstate_perf(min_perf, des_perf, max_perf, cpudata->freq, 592 592 cpudata->cur.mperf, cpudata->cur.aperf, cpudata->cur.tsc, 593 593 cpudata->cpu, fast_switch); 594 594 }
+1 -1
drivers/cpufreq/cpufreq.c
··· 2222 2222 2223 2223 if (trace_cpu_frequency_enabled()) { 2224 2224 for_each_cpu(cpu, policy->cpus) 2225 - trace_cpu_frequency(freq, cpu); 2225 + trace_call__cpu_frequency(freq, cpu); 2226 2226 } 2227 2227 2228 2228 return freq;
+1 -1
drivers/cpufreq/intel_pstate.c
··· 3132 3132 return; 3133 3133 3134 3134 sample = &cpu->sample; 3135 - trace_pstate_sample(trace_type, 3135 + trace_call__pstate_sample(trace_type, 3136 3136 0, 3137 3137 old_pstate, 3138 3138 cpu->pstate.current_pstate,