From nobody Thu Apr 2 13:32:24 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9E20B3176E4 for ; Sun, 29 Mar 2026 15:54:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774799675; cv=none; b=HmtOh2OCH1NC0R2Af0wq2VpLiWg94VHrjP7Ui+G1Z5UR4iVAzMp3U3KPN+OqDVn2nlQSFBDofDPcf/IUESuTtlM5VBn2Y+mDZSwy94ocAfad8Xvi3t0dJjUmdYAR5LTJorFvrGt8qg2FMdE4Rs1FaSvmPElM5fiaxSjkx70aVLE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774799675; c=relaxed/simple; bh=a3pRDvH3/9cM3syu00n4JHgxTROl1ZRb8IG7wOz+v8s=; h=Message-ID:Date:From:To:Cc:Subject:References:MIME-Version: Content-Type; b=rYAn2dr8HnfeFOIZeKv9tat7uAzioPpirMPBLeLv+uRfazqGwajK8n1grIBDKstZliTaaQRhVNbgZmxQ7Fd0DRHyu51/8Fz6gpHPbwbEPFa9tg3LsBlv+iMIHdMANmjU2gW2fJWNm4VLvpQC4TLCIlaHDEpoqPdko/5znsz1HTg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=B77b/LZn; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="B77b/LZn" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 72C8EC2BCB4; Sun, 29 Mar 2026 15:54:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1774799675; bh=a3pRDvH3/9cM3syu00n4JHgxTROl1ZRb8IG7wOz+v8s=; h=Date:From:To:Cc:Subject:References:From; b=B77b/LZnoFOzjN8v1iBMSBgjCbKkktFcdMUM+GZWBh19+bqH6QgMEZNdGkE/cqAAP FTSvZOqZWTOvfUDaKXttFYOD6mYp1Qksydz3Nr6ESFIU7c12oz5KJsChzSnZcznkpt sE9MCikBtsyNAmHfd4WglSmuS1NXL9ERDXed3c6kquFGexMuEpJ13lRilEqSgZKG18 QdLDznZ/Is/Hv+XQ+ORmvPDbWUwsIXirIa4O2JN+L1MSF6+yQYitarnP6WnidaMkvY 0KF2VOp4QIXBnXL+8ON/RNF/u6uOFYIyJQcKw16MIYJUYi0tNX0wQlaTo8GSesRDwQ XFsjNFSLQzU6A== Received: from rostedt by gandalf with local (Exim 4.99.1) (envelope-from ) id 1w6sU5-0000000FqtM-19b0; Sun, 29 Mar 2026 11:55:29 -0400 Message-ID: <20260329155529.135653820@kernel.org> User-Agent: quilt/0.69 Date: Sun, 29 Mar 2026 11:55:14 -0400 From: Steven Rostedt To: linux-kernel@vger.kernel.org Cc: Masami Hiramatsu , Mark Rutland , Mathieu Desnoyers , Andrew Morton , Huang Rui , Mario Limonciello , Perry Yuan , "Rafael J. Wysocki" , Viresh Kumar , Srinivas Pandruvada , Len Brown , Peter Zijlstra , "Vineeth Pillai (Google)" , "Gautham R. Shenoy" Subject: [for-next][PATCH 2/3] cpufreq: Use trace_call__##name() at guarded tracepoint call sites References: <20260329155512.926671150@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: "Vineeth Pillai (Google)" 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 Cc: Mario Limonciello Cc: Perry Yuan Cc: "Rafael J. Wysocki" Cc: Viresh Kumar Cc: Srinivas Pandruvada Cc: Len Brown Link: https://patch.msgid.link/20260323160052.17528-7-vineeth@bitbyteword.o= rg Suggested-by: Steven Rostedt Suggested-by: Peter Zijlstra Signed-off-by: Vineeth Pillai (Google) Assisted-by: Claude:claude-sonnet-4-6 Acked-by: Rafael J. Wysocki (Intel) # cpufreq core Reviewed-by: Gautham R. Shenoy Signed-off-by: Steven Rostedt (Google) --- drivers/cpufreq/amd-pstate.c | 10 +++++----- drivers/cpufreq/cpufreq.c | 2 +- drivers/cpufreq/intel_pstate.c | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/cpufreq/amd-pstate.c b/drivers/cpufreq/amd-pstate.c index 5aa9fcd80cf5..4c47324aa2f7 100644 --- a/drivers/cpufreq/amd-pstate.c +++ b/drivers/cpufreq/amd-pstate.c @@ -247,7 +247,7 @@ static int msr_update_perf(struct cpufreq_policy *polic= y, u8 min_perf, if (trace_amd_pstate_epp_perf_enabled()) { union perf_cached perf =3D READ_ONCE(cpudata->perf); =20 - trace_amd_pstate_epp_perf(cpudata->cpu, + trace_call__amd_pstate_epp_perf(cpudata->cpu, perf.highest_perf, epp, min_perf, @@ -298,7 +298,7 @@ static int msr_set_epp(struct cpufreq_policy *policy, u= 8 epp) if (trace_amd_pstate_epp_perf_enabled()) { union perf_cached perf =3D cpudata->perf; =20 - trace_amd_pstate_epp_perf(cpudata->cpu, perf.highest_perf, + trace_call__amd_pstate_epp_perf(cpudata->cpu, perf.highest_perf, epp, FIELD_GET(AMD_CPPC_MIN_PERF_MASK, cpudata->cppc_req_cached), @@ -343,7 +343,7 @@ static int shmem_set_epp(struct cpufreq_policy *policy,= u8 epp) if (trace_amd_pstate_epp_perf_enabled()) { union perf_cached perf =3D cpudata->perf; =20 - trace_amd_pstate_epp_perf(cpudata->cpu, perf.highest_perf, + trace_call__amd_pstate_epp_perf(cpudata->cpu, perf.highest_perf, epp, FIELD_GET(AMD_CPPC_MIN_PERF_MASK, cpudata->cppc_req_cached), @@ -507,7 +507,7 @@ static int shmem_update_perf(struct cpufreq_policy *pol= icy, u8 min_perf, if (trace_amd_pstate_epp_perf_enabled()) { union perf_cached perf =3D READ_ONCE(cpudata->perf); =20 - trace_amd_pstate_epp_perf(cpudata->cpu, + trace_call__amd_pstate_epp_perf(cpudata->cpu, perf.highest_perf, epp, min_perf, @@ -588,7 +588,7 @@ static void amd_pstate_update(struct amd_cpudata *cpuda= ta, u8 min_perf, } =20 if (trace_amd_pstate_perf_enabled() && amd_pstate_sample(cpudata)) { - trace_amd_pstate_perf(min_perf, des_perf, max_perf, cpudata->freq, + trace_call__amd_pstate_perf(min_perf, des_perf, max_perf, cpudata->freq, cpudata->cur.mperf, cpudata->cur.aperf, cpudata->cur.tsc, cpudata->cpu, fast_switch); } diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index 277884d91913..58901047eae5 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c @@ -2222,7 +2222,7 @@ unsigned int cpufreq_driver_fast_switch(struct cpufre= q_policy *policy, =20 if (trace_cpu_frequency_enabled()) { for_each_cpu(cpu, policy->cpus) - trace_cpu_frequency(freq, cpu); + trace_call__cpu_frequency(freq, cpu); } =20 return freq; diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c index 11c58af41900..70be95220914 100644 --- a/drivers/cpufreq/intel_pstate.c +++ b/drivers/cpufreq/intel_pstate.c @@ -3132,7 +3132,7 @@ static void intel_cpufreq_trace(struct cpudata *cpu, = unsigned int trace_type, in return; =20 sample =3D &cpu->sample; - trace_pstate_sample(trace_type, + trace_call__pstate_sample(trace_type, 0, old_pstate, cpu->pstate.current_pstate, --=20 2.51.0