]> git.ipfire.org Git - thirdparty/linux.git/commit
tracing: Have trace_printk functions use flags instead of using global_trace
authorSteven Rostedt <rostedt@goodmis.org>
Sun, 8 Feb 2026 03:24:24 +0000 (22:24 -0500)
committerSteven Rostedt (Google) <rostedt@goodmis.org>
Mon, 9 Feb 2026 02:01:12 +0000 (21:01 -0500)
commitf377912b3dd71312cbf9eaf2c60263cb6e7cba59
tree8773cbaf80f64700d313534078c26604b0c3371e
parent93c88d06accdeceee4fbd243b084d3749bcd96d7
tracing: Have trace_printk functions use flags instead of using global_trace

The trace.c file has become a dumping ground for all tracing code and has
become quite large. In order to move the trace_printk functions out of it
these functions can not access global_trace directly, as that is something
that needs to stay static in trace.c.

Instead of testing the trace_array tr pointer to &global_trace, test the
tr->flags to see if TRACE_ARRAY_FL_GLOBAL set.

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://patch.msgid.link/20260208032450.491116245@kernel.org
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
kernel/trace/trace.c