]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
tracing: kprobe-event: Return directly when trace kprobes is empty
authorsunliming <sunliming@kylinos.cn>
Tue, 27 Jan 2026 05:38:48 +0000 (13:38 +0800)
committerMasami Hiramatsu (Google) <mhiramat@kernel.org>
Thu, 29 Jan 2026 00:23:43 +0000 (09:23 +0900)
commitb8121b9cdce163cdf07f687dd9cac1182c5e6a21
tree6a237c629d853d0fe4b26933057fcf501ca0aa8d
parentf76d1c41b609b3e8f727fe681b7dd36bab71e3c3
tracing: kprobe-event: Return directly when trace kprobes is empty

In enable_boot_kprobe_events(), it returns directly when trace kprobes is
empty, thereby reducing the function's execution time. This function may
otherwise wait for the event_mutex lock for tens of milliseconds on certain
machines, which is unnecessary when trace kprobes is empty.

Link: https://lore.kernel.org/all/20260127053848.108473-1-sunliming@linux.dev/
Signed-off-by: sunliming <sunliming@kylinos.cn>
Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
kernel/trace/trace_kprobe.c