public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/5] tracing: Fix tracer options per instance
@ 2025-11-05 16:19 Steven Rostedt
  2025-11-05 16:19 ` [PATCH 1/5] tracing: Remove dummy options and flags Steven Rostedt
                   ` (4 more replies)
  0 siblings, 5 replies; 12+ messages in thread
From: Steven Rostedt @ 2025-11-05 16:19 UTC (permalink / raw)
  To: linux-kernel, linux-trace-kernel
  Cc: Masami Hiramatsu, Mark Rutland, Mathieu Desnoyers, Andrew Morton


The tracers (like function and function_graph) have options that modify
how they behave or how they are shown in the trace file. As these options
were created before instances (multiple buffers), the flags variable that
represent these options were global for the tracer.

Now that a tracer may exist in multiple instances, having a global flags
that kinda affect every instance of that tracer does not make sense.
The reason it "kinda" affects them, is that the code that updates an option
for an instance, only does the change for the tracer running in that instance.
If a tracer is already running in another instance, it will not be affected.
But because the option is saved in a global variable, if the tracer is stopped
and restarted in the instance, then the option will take affect.

Since each instance has its own interface to modify the options, the effect
of an option should only affect the tracer for the given instance. This means
that the state of the options for each tracer must be saved for each instance
separately.

Add a new struct tracers field in the trace_array (instance descriptor) that
holds a descriptor that points to a tracer and contains its flags values. This
will be used to see what tracers are available for an instance.

Now when a tracer option is modified for an instance, it only affects the
tracer in that instance and not semi-effects the tracers in other instances.

Steven Rostedt (5):
      tracing: Remove dummy options and flags
      tracing: Have add_tracer_options() error pass up to callers
      tracing: Have tracer option be instance specific
      tracing: Have function tracer define options per instance
      tracing: Have function graph tracer define options per instance

----
 kernel/trace/trace.c                 | 280 ++++++++++++++++++++++-------------
 kernel/trace/trace.h                 |   3 +
 kernel/trace/trace_functions.c       |  10 +-
 kernel/trace/trace_functions_graph.c |  18 ++-
 4 files changed, 198 insertions(+), 113 deletions(-)

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2026-01-09 21:40 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-05 16:19 [PATCH 0/5] tracing: Fix tracer options per instance Steven Rostedt
2025-11-05 16:19 ` [PATCH 1/5] tracing: Remove dummy options and flags Steven Rostedt
2025-11-05 16:19 ` [PATCH 2/5] tracing: Have add_tracer_options() error pass up to callers Steven Rostedt
2025-11-05 16:19 ` [PATCH 3/5] tracing: Have tracer option be instance specific Steven Rostedt
2025-11-06 14:38   ` kernel test robot
2025-11-06 17:19     ` Steven Rostedt
2025-11-06 15:29   ` kernel test robot
2026-01-05 15:23   ` Dan Carpenter
2026-01-09 15:23     ` Steven Rostedt
2026-01-09 21:40       ` Dan Carpenter
2025-11-05 16:19 ` [PATCH 4/5] tracing: Have function tracer define options per instance Steven Rostedt
2025-11-05 16:19 ` [PATCH 5/5] tracing: Have function graph " Steven Rostedt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox