]> www.infradead.org Git - users/jedix/linux-maple.git/commit
tracing: Use tracer_tracing_disable() instead of "disabled" field for ftrace_dump_one()
authorSteven Rostedt <rostedt@goodmis.org>
Mon, 5 May 2025 21:21:09 +0000 (17:21 -0400)
committerSteven Rostedt (Google) <rostedt@goodmis.org>
Fri, 9 May 2025 19:18:40 +0000 (15:18 -0400)
commit6ba3e0533fa63bdeb5b3c4c9688a4ecba2705722
tree4d346007bd1e7b10575028fdc8a0037feabdcd35
parentdbecef68ad33ddc8fe76a276eeb914d51d29b4c4
tracing: Use tracer_tracing_disable() instead of "disabled" field for ftrace_dump_one()

The per CPU "disabled" value was the original way to disable tracing when
the tracing subsystem was first created. Today, the ring buffer
infrastructure has its own way to disable tracing. In fact, things have
changed so much since 2008 that many things ignore the disable flag.

The ftrace_dump_one() function iterates over all the current tracing CPUs and
increments the "disabled" counter before doing the dump, and decrements it
afterward.

As the disabled flag can be ignored, doing this today is not reliable.
Instead use the new tracer_tracing_disable() that calls into the ring
buffer code to do the disabling.

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