summaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorSteven Rostedt <rostedt@goodmis.org>2025-01-16 09:33:36 -0500
committerSteven Rostedt (Google) <rostedt@goodmis.org>2025-01-16 09:41:08 -0500
commitb355247df104ef6644288884afd2c08b7bf49897 (patch)
tree406357f21e131a66d537375f882cb6d91c247c2d /Documentation
parent4c86bc531e60900053384867c082675bba82c29f (diff)
downloadlinux-b355247df104ef6644288884afd2c08b7bf49897.tar.gz
linux-b355247df104ef6644288884afd2c08b7bf49897.tar.bz2
linux-b355247df104ef6644288884afd2c08b7bf49897.zip
tracing: Cache ":mod:" events for modules not loaded yet
When the :mod: command is written into /sys/kernel/tracing/set_event (or that file within an instance), if the module specified after the ":mod:" is not yet loaded, it will store that string internally. When the module is loaded, it will enable the events as if the module was loaded when the string was written into the set_event file. This can also be useful to enable events that are in the init section of the module, as the events are enabled before the init section is executed. This also works on the kernel command line: trace_event=:mod:<module> Will enable the events for <module> when it is loaded. Cc: Masami Hiramatsu <mhiramat@kernel.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Cc: Andrew Morton <akpm@linux-foundation.org> Link: https://lore.kernel.org/20250116143533.514730995@goodmis.org Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/admin-guide/kernel-parameters.txt8
-rw-r--r--Documentation/trace/events.rst4
2 files changed, 11 insertions, 1 deletions
diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
index 3872bc6ec49d..4f563cb0ca0f 100644
--- a/Documentation/admin-guide/kernel-parameters.txt
+++ b/Documentation/admin-guide/kernel-parameters.txt
@@ -6858,6 +6858,14 @@
comma-separated list of trace events to enable. See
also Documentation/trace/events.rst
+ To enable modules, use :mod: keyword:
+
+ trace_event=:mod:<module>
+
+ The value before :mod: will only enable specific events
+ that are part of the module. See the above mentioned
+ document for more information.
+
trace_instance=[instance-info]
[FTRACE] Create a ring buffer instance early in boot up.
This will be listed in:
diff --git a/Documentation/trace/events.rst b/Documentation/trace/events.rst
index 3db57516eb86..2d88a2acacc0 100644
--- a/Documentation/trace/events.rst
+++ b/Documentation/trace/events.rst
@@ -60,7 +60,9 @@ a specific module::
# echo ':mod:<module>' > /sys/kernel/tracing/set_event
-Will enable all events in the module ``<module>``.
+Will enable all events in the module ``<module>``. If the module is not yet
+loaded, the string will be saved and when a module is that matches ``<module>``
+is loaded, then it will apply the enabling of events then.
The text before ``:mod:`` will be parsed to specify specific events that the
module creates::