tracing: Stop the tracing while changing the ring buffer subbuf size
authorSteven Rostedt (Google) <rostedt@goodmis.org>
Tue, 19 Dec 2023 18:54:24 +0000 (13:54 -0500)
committerSteven Rostedt (Google) <rostedt@goodmis.org>
Thu, 21 Dec 2023 16:00:56 +0000 (11:00 -0500)
commitfa4b54af5ba17a59ce082e9d710eb638bdce7637
treee578461b79272e45c1f6566836f81bb0fb83369c
parentaa067682adf19ca78f81cd57539282dbfd7cce21
tracing: Stop the tracing while changing the ring buffer subbuf size

Because the main buffer and the snapshot buffer need to be the same for
some tracers, otherwise it will fail and disable all tracing, the tracers
need to be stopped while updating the sub buffer sizes so that the tracers
see the main and snapshot buffers with the same sub buffer size.

Link: https://lore.kernel.org/linux-trace-kernel/20231219185630.353222794@goodmis.org
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: Tzvetomir Stoyanov <tz.stoyanov@gmail.com>
Cc: Vincent Donnefort <vdonnefort@google.com>
Cc: Kent Overstreet <kent.overstreet@gmail.com>
Fixes: 2808e31ec12e ("ring-buffer: Add interface for configuring trace sub buffer size")
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
kernel/trace/trace.c