From nobody Thu Apr 2 10:44:11 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 9E32C361DA2 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=ICIjYtSUDmOxUka/FKK4TCm/OLqAMm2cOklWET9I1nz1IqbeDeFLZTmKCGkmFfIEW3vOTjO45oauijnC+yTlX91ugvEUaEP3HMkSoqSmv2lrZz41M5b8kpM/FjPCyGiK6BgQGJSsgZpX+R38E3MboBQxqNs3uj+i7PxyH32E23s= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774799675; c=relaxed/simple; bh=PVBKB2SCRXrbvDcEuEYtLcZixSqNmSGPMwEn2xXmndA=; h=Message-ID:Date:From:To:Cc:Subject:References:MIME-Version: Content-Type; b=pmcN/v34BeV2IilTBceopZCXbWo7UhGLh2fdb+7p+O/spHZSkP51DMUExUDT681EIEPJe8eO5aYDgu+6lgiVPdisAuxmK9ZOMDkkNprw3iRKHVgWC2S1ZWZn2q8UjotrkOoMhOSnGUQVRD5fR9DWuy2smMFlH9VcOnVfeMriPlA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ESSzj3xw; 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="ESSzj3xw" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4188CC2BC9E; 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=PVBKB2SCRXrbvDcEuEYtLcZixSqNmSGPMwEn2xXmndA=; h=Date:From:To:Cc:Subject:References:From; b=ESSzj3xw/OgwxM7KtgyoLFO3Xdcg805KjTZsely56Wu4LUDAWlHwJatgsSrMLt6Ec r1PKZ4C448LyYPsVgiD7m/Jaz/nWh9S9WBWg9PtGlcbjSRBzOdTfuqnjli209cPJ23 fGaBVLutm5Rc0u/F/Ly+idUJx1VVtaBeQTGLWE4rPRDzzMGPDHoARyNTrHU8BV9hs9 5+eNangJLtpcAvf94K+fwXfoactgeYdNVcYnNMgaS0DO6L0bhTu5cRU3cYmcwFXfCq UU9KnoQlqZN2sSAQLrQQEFLXRWuMDLU3T4Mwx0tlAfEt0iZ7Ci/FovkenaeHdSz03x i6tXcSzyWqvbA== Received: from rostedt by gandalf with local (Exim 4.99.1) (envelope-from ) id 1w6sU5-0000000Fqsr-0Ugj; Sun, 29 Mar 2026 11:55:29 -0400 Message-ID: <20260329155528.976183997@kernel.org> User-Agent: quilt/0.69 Date: Sun, 29 Mar 2026 11:55:13 -0400 From: Steven Rostedt To: linux-kernel@vger.kernel.org Cc: Masami Hiramatsu , Mark Rutland , Mathieu Desnoyers , Andrew Morton , Mark Brown Subject: [for-next][PATCH 1/3] tracing: Remove tracing_alloc_snapshot() when snapshot isnt defined 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: Steven Rostedt The function tracing_alloc_snapshot() is only used between trace.c and trace_snapshot.c. When snapshot isn't configured, it's not used at all. The stub function was defined as a global with no users and no prototype causing build issues. Remove the function when snapshot isn't configured as nothing is calling it. Also remove the EXPORT_SYMBOL_GPL() that was associated with it as it's not used outside of the tracing subsystem which also includes any modules. Cc: Masami Hiramatsu Cc: Mathieu Desnoyers Link: https://patch.msgid.link/20260328101946.2c4ef4a5@robin Reported-by: Mark Brown Closes: https://lore.kernel.org/all/acb-IuZ4vDkwwQLW@sirena.co.uk/ Fixes: bade44fe546212 (tracing: Move snapshot code out of trace.c and into = trace_snapshot.c) Signed-off-by: Steven Rostedt (Google) --- kernel/trace/trace.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index 850f62032fd2..7b9dd6378849 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c @@ -810,19 +810,12 @@ int tracing_alloc_snapshot(void) =20 return ret; } -EXPORT_SYMBOL_GPL(tracing_alloc_snapshot); #else void tracing_snapshot(void) { WARN_ONCE(1, "Snapshot feature not enabled, but internal snapshot used"); } EXPORT_SYMBOL_GPL(tracing_snapshot); -int tracing_alloc_snapshot(void) -{ - WARN_ONCE(1, "Snapshot feature not enabled, but snapshot allocation used"= ); - return -ENODEV; -} -EXPORT_SYMBOL_GPL(tracing_alloc_snapshot); void tracing_snapshot_alloc(void) { /* Give warning */ --=20 2.51.0 From nobody Thu Apr 2 10:44:11 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 From nobody Thu Apr 2 10:44:11 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 9E2A331E85F 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=I61VIH9NxkfU+34LAH3ejvL2Y+j1tDVYuRgCzo5kOYy9EIm3nnSZjhweaA8xTFD4Hf3hQ+xylH+ZSAXmN7xkdumfYXyNA1jqvwvzpVDMzePe5k0yvJaevATwJ5oos0CxIIzBc9zC13TCZRPvn/9jQw3MpK/9rAydy0pnwY6bpqQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774799675; c=relaxed/simple; bh=njFZgbZ1wOHvsb76bmRKR0VF+wG2ly22ZK3PwwLK4Zs=; h=Message-ID:Date:From:To:Cc:Subject:References:MIME-Version: Content-Type; b=WDuFDQ+t0iriDxYFQaw7wbr3dG0YwkRmFb7kM7jnd9mD8jkJuOyGlV7wU/q17Fbrc33GspkmdNqPjYS8UiVwK3AnGzaENMvcIiKPKRZhZM3aBZqWysT+yUWCCJqZmpt73lmFA9Rzr4rZcKu68iwaR2LRxixQXbabPx8ZhAjvfSw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ATMN7wwJ; 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="ATMN7wwJ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 71169C2BCB5; 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=njFZgbZ1wOHvsb76bmRKR0VF+wG2ly22ZK3PwwLK4Zs=; h=Date:From:To:Cc:Subject:References:From; b=ATMN7wwJ19vkyq9nlUfJinDGbgtXG+VIDgXqIrLeb80kYhjSw0zK9PDZxcSEhc7e9 vKqNUx7aN7PD4KCN3hCHjaVoFwuBiV1dGRYASxIMmKUUtIRj5Eeu7DxCJjIIbLQpNI IiPtuOYoUKrOpUg2oezw5oQdxCqMRlRCHhtj53GD6Tnvup2NzPs2r/hUD/1+aIDjET 7AYzjXRVukfzlm7Oo86ifXtD+xSUY/zkjQ7tsQPKMkYdksHZPxKLOac+FG0yi/6ncQ c2Yu5ofgecMaOfEFFHYIH7t4dflOPAvWJkeWA4DRh5aQnuEiFqLg6zyUqZEo4dzY8a Gf1+vRFWi8/Iw== Received: from rostedt by gandalf with local (Exim 4.99.1) (envelope-from ) id 1w6sU5-0000000Fqtr-1pyx; Sun, 29 Mar 2026 11:55:29 -0400 Message-ID: <20260329155529.294995470@kernel.org> User-Agent: quilt/0.69 Date: Sun, 29 Mar 2026 11:55:15 -0400 From: Steven Rostedt To: linux-kernel@vger.kernel.org Cc: Masami Hiramatsu , Mark Rutland , Mathieu Desnoyers , Andrew Morton , Rasmus Villemoes , Andy Shevchenko , Sergey Senozhatsky , David Laight , Petr Mladek , Aaron Tomlin Subject: [for-next][PATCH 3/3] tracing: Remove spurious default precision from show_event_trigger/filter formats 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: David Laight Change 2d8b7f9bf8e6e ("tracing: Have show_event_trigger/filter format a bit= more in columns") added space padding to align the output. However it used ("%*.s", len, "") which requests the default precision. It doesn't matter here whether the userspace default (0) or kernel default (no precision) is used, but the format should be "%*s". Cc: Mathieu Desnoyers Cc: Rasmus Villemoes Cc: Andy Shevchenko Cc: Sergey Senozhatsky Cc: Andrew Morton Link: https://patch.msgid.link/20260326201824.3919-1-david.laight.linux@gma= il.com Signed-off-by: David Laight Acked-by: Masami Hiramatsu (Google) Reviewed-by: Petr Mladek Reviewed-by: Aaron Tomlin Signed-off-by: Steven Rostedt (Google) --- kernel/trace/trace_events.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c index 6523c873689a..de807a9e2371 100644 --- a/kernel/trace/trace_events.c +++ b/kernel/trace/trace_events.c @@ -1718,7 +1718,7 @@ static int t_show_filters(struct seq_file *m, void *v) =20 len =3D get_call_len(call); =20 - seq_printf(m, "%s:%s%*.s%s\n", call->class->system, + seq_printf(m, "%s:%s%*s%s\n", call->class->system, trace_event_name(call), len, "", filter->filter_string); =20 return 0; @@ -1750,7 +1750,7 @@ static int t_show_triggers(struct seq_file *m, void *= v) len =3D get_call_len(call); =20 list_for_each_entry_rcu(data, &file->triggers, list) { - seq_printf(m, "%s:%s%*.s", call->class->system, + seq_printf(m, "%s:%s%*s", call->class->system, trace_event_name(call), len, ""); =20 data->cmd_ops->print(m, data); --=20 2.51.0