Re: [PATCH 3/9] devfreq: Use trace_call__##name() at guarded tracepoint call sites

From: Choi Chanwoo

Date: Sat Nov 14 2026 - 09:11:38 EST




On 10/28/2026 12:37 AM, Steven Rostedt wrote:
> From: Vineeth Pillai <vineeth@xxxxxxxxxxxxxxx>
>
> 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.
>
> Original v2 series:
> https://lore.kernel.org/linux-trace-kernel/20260323160052.17528-1-vineeth@xxxxxxxxxxxxxxx/
>
> Parts of the original v2 series have already been merged in mainline.
> This patch is being reposted as a follow-up cleanup for the remaining
> unmerged pieces.
>
> Link: https://patch.msgid.link/20260515135920.2238808-1-vineeth@xxxxxxxxxxxxxxx
> Suggested-by: Steven Rostedt <rostedt@xxxxxxxxxxx>
> Suggested-by: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
> Signed-off-by: Vineeth Pillai (Google) <vineeth@xxxxxxxxxxxxxxx>
> Assisted-by: Claude:claude-sonnet-4-6
> Signed-off-by: Steven Rostedt <rostedt@xxxxxxxxxxx>
> ---
> drivers/devfreq/devfreq.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c
> index 82dd9a43dc62..9f71d9dc4a70 100644
> --- a/drivers/devfreq/devfreq.c
> +++ b/drivers/devfreq/devfreq.c
> @@ -370,7 +370,7 @@ static int devfreq_set_target(struct devfreq *devfreq, unsigned long new_freq,
> * change order of between devfreq device and passive devfreq device.
> */
> if (trace_devfreq_frequency_enabled() && new_freq != cur_freq)
> - trace_devfreq_frequency(devfreq, new_freq, cur_freq);
> + trace_call__devfreq_frequency(devfreq, new_freq, cur_freq);
>
> freqs.new = new_freq;
> devfreq_notify_transition(devfreq, &freqs, DEVFREQ_POSTCHANGE);

Applied it.

Thanks,
Chanwoo Choi