[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20260208032417.262341179@kernel.org>
Date: Sat, 07 Feb 2026 22:24:17 -0500
From: Steven Rostedt <rostedt@...nel.org>
To: linux-kernel@...r.kernel.org,
linux-trace-kernel@...r.kernel.org
Cc: Masami Hiramatsu <mhiramat@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
Andrew Morton <akpm@...ux-foundation.org>
Subject: [PATCH v2 00/10] tracing: Clean up trace.c and move some code into other files
The trace.c file was a dumping ground for most tracing code. Start
organizing it better by moving various functions out into their own files.
The trace.c file is almost 12000 lines in size, this is an effort to
bring that number down.
- Move some generic always_inline functions into trace.h
- Move the trace_printk functions into the existing trace_printk.c file.
This also required some clean up of the code.
- Move the pid filtering code into a new file: trace_pid.c.
This is mostly a non-functional change. But due to some clean ups, there
is still slightly some functional changes (but for the better).
This will also cause some existing code being worked on to conflict,
but I'll handle that.
Changes since v1: https://lore.kernel.org/linux-trace-kernel/20260206193741.767171392@kernel.org/
- These patches did not change, but the snapshot code movement was removed.
- This version has been tested more, but still needs more testing.
Steven Rostedt (10):
tracing: Make tracing_disabled global for tracing system
tracing: Make tracing_selftest_running global to the tracing subsystem
tracing: Move __trace_buffer_{un}lock_*() functions to trace.h
tracing: Move ftrace_trace_stack() out of trace.c and into trace.h
tracing: Make printk_trace global for tracing system
tracing: Make tracing_update_buffers() take NULL for global_trace
tracing: Have trace_printk functions use flags instead of using global_trace
tracing: Use system_state in trace_printk_init_buffers()
tracing: Move trace_printk functions out of trace.c and into trace_printk.c
tracing: Move pid filtering into trace_pid.c
----
kernel/trace/Makefile | 1 +
kernel/trace/trace.c | 779 +-------------------------------------------
kernel/trace/trace.h | 80 ++++-
kernel/trace/trace_events.c | 2 +-
kernel/trace/trace_kprobe.c | 2 +-
kernel/trace/trace_pid.c | 246 ++++++++++++++
kernel/trace/trace_printk.c | 431 ++++++++++++++++++++++++
7 files changed, 771 insertions(+), 770 deletions(-)
create mode 100644 kernel/trace/trace_pid.c
Powered by blists - more mailing lists