]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
sched: Use trace_call__<tp>() to save a static branch
authorGabriele Monaco <gmonaco@redhat.com>
Wed, 29 Apr 2026 09:41:37 +0000 (11:41 +0200)
committerPeter Zijlstra <peterz@infradead.org>
Tue, 5 May 2026 10:50:50 +0000 (12:50 +0200)
commit4ac4d6549a6563878d7c19c154e017f6cb7114d3
tree29273911a783a0f071d984c6a6188e59c0c7955a
parent7fd2df204f342fc17d1a0bfcd474b24232fb0f32
sched: Use trace_call__<tp>() to save a static branch

The wrapper functions __trace_set_current_state() and
__trace_set_need_resched() allow the tracepoints to be called from code
outside sched/core.c, those calls are already guarded by a
tracepoint_enabled(<tp>) so there is no need to repeat this check once
again inside the call using trace_<tp>().

Use the new trace_call__<tp>() API to directly call the tracepoint
without check. Those helper functions must be called after the
appropriate check.

Signed-off-by: Gabriele Monaco <gmonaco@redhat.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://patch.msgid.link/20260429094227.34087-1-gmonaco@redhat.com
kernel/sched/core.c