Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

tracing: Make printk_trace global for tracing system

The printk_trace is used to determine which trace_array trace_printk()
writes to. By making it a global variable among the tracing subsystem it
will allow the trace_printk functions to be moved out of trace.c and still
have direct access to that variable.

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.144525891@kernel.org
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>

+3 -1
+1 -1
kernel/trace/trace.c
··· 534 534 .trace_flags = TRACE_DEFAULT_FLAGS, 535 535 }; 536 536 537 - static struct trace_array *printk_trace = &global_trace; 537 + struct trace_array *printk_trace = &global_trace; 538 538 539 539 /* List of trace_arrays interested in the top level trace_marker */ 540 540 static LIST_HEAD(marker_copies);
+2
kernel/trace/trace.h
··· 482 482 483 483 extern unsigned long trace_adjust_address(struct trace_array *tr, unsigned long addr); 484 484 485 + extern struct trace_array *printk_trace; 486 + 485 487 /* 486 488 * The global tracer (top) should be the first trace array added, 487 489 * but we check the flag anyway.