mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/2] tracing: Override trace_instance parameter
@ 2026-09-19 14:38 Masami Hiramatsu (Google)
  2026-09-19 14:38 ` [PATCH 1/2] tracing: Override the same name trace_instance= by latter one Masami Hiramatsu (Google)
  2026-09-19 14:38 ` [PATCH 2/2] selftests/ftrace: Add test case for overriding trace_instance parameter Masami Hiramatsu (Google)
  0 siblings, 2 replies; 3+ messages in thread
From: Masami Hiramatsu (Google) @ 2026-09-19 14:38 UTC (permalink / raw)
  To: Jonathan Corbet, Steven Rostedt, Masami Hiramatsu, Shuah Khan
  Cc: Shuah Khan, Mathieu Desnoyers, linux-doc, linux-kernel,
	linux-trace-kernel, linux-kselftest

Hi,

This changes the trace_instance= kernel parameter to be overriden
by latter parameters. Currently if the user specifies the same
name trace_instance at boot time, the later one is skipped.
However, this does not allow user to override the trace_instance
setting via bootloader if user specifies the default trace_instance
in the bootconfig, because the bootconfig parameter is prepend to
the kernel cmdline. (IOW, the bootconfig expects kernel parameters
are LAST_WIN policy.)

To fix this issue, the [1/2] splits the command line parsing loop
and trace instance initialization loop. The parser checks the
overlap of the trace instance name and override by the later one
if those have the same name.

This series also have a test set as [2/2], which is based on
ftrace boottime test patchset [1], which is currently on
probes/core branch.

(Steve, can you review the boottime test series too? I think we
should have this kind of test anyway, and is nicer to have one in
the kernel tree.)

[1] https://lore.kernel.org/all/178649540853.438282.4271870161169100680.stgit@devnote2/

Thank you,

---

Masami Hiramatsu (Google) (2):
      tracing: Override the same name trace_instance= by latter one
      selftests/ftrace: Add test case for overriding trace_instance parameter


 Documentation/admin-guide/kernel-parameters.txt    |    7 +
 Documentation/trace/debugging.rst                  |   15 ++
 kernel/trace/trace.c                               |  127 +++++++++++++++-----
 .../cmdline-07-trace-instance-override.bconf       |    2 
 .../cmdline-07-trace-instance-override.cmdline     |    1 
 .../tests/cmdline-07-trace-instance-override.sh    |   56 +++++++++
 6 files changed, 174 insertions(+), 34 deletions(-)
 create mode 100644 tools/testing/selftests/ftrace/boottime/bootconfigs/cmdline-07-trace-instance-override.bconf
 create mode 100644 tools/testing/selftests/ftrace/boottime/cmdlines/cmdline-07-trace-instance-override.cmdline
 create mode 100644 tools/testing/selftests/ftrace/boottime/tests/cmdline-07-trace-instance-override.sh

--
Masami Hiramatsu (Google) <mhiramat@kernel.org>

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

end of thread, other threads:[~2026-09-19 14:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-19 14:38 [PATCH 0/2] tracing: Override trace_instance parameter Masami Hiramatsu (Google)
2026-09-19 14:38 ` [PATCH 1/2] tracing: Override the same name trace_instance= by latter one Masami Hiramatsu (Google)
2026-09-19 14:38 ` [PATCH 2/2] selftests/ftrace: Add test case for overriding trace_instance parameter Masami Hiramatsu (Google)

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

all inboxes | Powered by JetHome®