]> git.ipfire.org Git - thirdparty/linux.git/commit
tracing: Add show_event_filters to expose active event filters
authorAaron Tomlin <atomlin@atomlin.com>
Mon, 5 Jan 2026 14:29:38 +0000 (09:29 -0500)
committerSteven Rostedt (Google) <rostedt@goodmis.org>
Mon, 26 Jan 2026 22:44:15 +0000 (17:44 -0500)
commit729757b96a662d87e334fe8b837707800d8fd551
treed1013f789dbce6387a91fad638463a9ae14d6b7b
parente5136678b1c861ed7d0c985c1acdecd37f949937
tracing: Add show_event_filters to expose active event filters

Currently, to audit active Ftrace event filters, userspace must
recursively traverse the events/ directory and read each individual
filter file. This is inefficient for monitoring tools and debugging.

Introduce "show_event_filters" at the trace root directory. This file
displays all events that currently have a filter applied, alongside the
actual filter string, in a consolidated system:event [tab] filter
format.

The implementation reuses the existing trace_event_file iterators to
ensure atomic traversal of the event list and utilises guard(rcu)() for
automatic, scope-based protection when accessing volatile filter
strings.

Link: https://patch.msgid.link/20260105142939.2655342-2-atomlin@atomlin.com
Signed-off-by: Aaron Tomlin <atomlin@atomlin.com>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Documentation/trace/ftrace.rst
kernel/trace/trace_events.c