]> www.infradead.org Git - users/jedix/linux-maple.git/commit
tracing: kdb: Use tracer_tracing_on/off() instead of setting per CPU disabled
authorSteven Rostedt <rostedt@goodmis.org>
Mon, 5 May 2025 21:21:10 +0000 (17:21 -0400)
committerSteven Rostedt (Google) <rostedt@goodmis.org>
Fri, 9 May 2025 19:18:47 +0000 (15:18 -0400)
commita9839d204896c59b0e2ae08e571515b1cf752bd1
tree6b91d5af5b9012f7e8784145556707abed2db532
parent6ba3e0533fa63bdeb5b3c4c9688a4ecba2705722
tracing: kdb: Use tracer_tracing_on/off() instead of setting per CPU disabled

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 kdb_ftdump() 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, simply call tracer_tracing_off() and then tracer_tracing_on() to
disable and then enabled the entire ring buffer in one go!

Cc: Jason Wessel <jason.wessel@windriver.com>
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>
Cc: Daniel Thompson <danielt@kernel.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Link: https://lore.kernel.org/20250505212235.549033722@goodmis.org
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
kernel/trace/trace_kdb.c