linux-trace-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/6] rtla: Always set all tracer options
@ 2025-03-20  9:24 Tomas Glozar
  2025-03-20  9:24 ` [PATCH 1/6] rtla/osnoise: Unify params struct Tomas Glozar
                   ` (5 more replies)
  0 siblings, 6 replies; 14+ messages in thread
From: Tomas Glozar @ 2025-03-20  9:24 UTC (permalink / raw)
  To: Steven Rostedt
  Cc: linux-trace-kernel, linux-kernel, John Kacur, Luis Goncalves,
	Tomas Glozar

rtla should not rely on osnoise tracer being set to default options,
since this might not be the case - either due to the user using the
tracer without rtla, or due to rtla exiting abnormally and not resetting
the options to their previous value.

A part of the problem is already fixed by commits 217f0b1e990e
("rtla/timerlat_top: Set OSNOISE_WORKLOAD for kernel threads") and
d8d866171a41 ("rtla/timerlat_hist: Set OSNOISE_WORKLOAD for kernel
threads"), but for other options than for OSNOISE_WORKLOAD, and for all
options in the case of rtla-osnoise, it is not fixed.

This patchset sets all options to their default values, unless they are
set by command line options to different values.

Before doing that, code setting the tracer options is unified between
top and hist for both osnoise and timerlat.

Notes:
- The unification depends on a commit in linux-next that already does
that for rtla-timerlat, for the purpose of the implementation of the BPF
sample collection [1]. For rtla-osnoise, this is done in an analogous
commit in this patchset.
- Because of the former and because of the unification requiring changes
for older versions of the kernel, I do not Cc stable here. If needed,
I can sent the backport to stable manually after both this and the BPF
sample collection patchsets are in Linus's tree.

[1] https://lore.kernel.org/linux-trace-kernel/20250218145859.27762-2-tglozar@redhat.com/

Tomas Glozar (6):
  rtla/osnoise: Unify params struct
  rtla: Unify apply_config between top and hist
  rtla/osnoise: Set OSNOISE_WORKLOAD to true
  rtla: Always set all tracer options
  rtla/tests: Reset osnoise options before check
  rtla/tests: Test setting default options

 tools/tracing/rtla/src/osnoise.c       |  86 +++++++++++++++++-
 tools/tracing/rtla/src/osnoise.h       |  48 ++++++++++
 tools/tracing/rtla/src/osnoise_hist.c  | 118 +++---------------------
 tools/tracing/rtla/src/osnoise_top.c   | 120 +++----------------------
 tools/tracing/rtla/src/timerlat.c      | 106 ++++++++++++++++++++++
 tools/tracing/rtla/src/timerlat.h      |  12 +--
 tools/tracing/rtla/src/timerlat_hist.c | 119 ++++--------------------
 tools/tracing/rtla/src/timerlat_top.c  | 110 +++--------------------
 tools/tracing/rtla/tests/engine.sh     |  66 ++++++++++++++
 tools/tracing/rtla/tests/osnoise.t     |   6 ++
 10 files changed, 370 insertions(+), 421 deletions(-)

-- 
2.48.1


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

end of thread, other threads:[~2025-03-24 16:05 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-20  9:24 [PATCH 0/6] rtla: Always set all tracer options Tomas Glozar
2025-03-20  9:24 ` [PATCH 1/6] rtla/osnoise: Unify params struct Tomas Glozar
2025-03-20 19:00   ` John Kacur
2025-03-24 16:06     ` Steven Rostedt
2025-03-20  9:24 ` [PATCH 2/6] rtla: Unify apply_config between top and hist Tomas Glozar
2025-03-20 19:27   ` John Kacur
2025-03-20  9:24 ` [PATCH 3/6] rtla/osnoise: Set OSNOISE_WORKLOAD to true Tomas Glozar
2025-03-20 19:40   ` John Kacur
2025-03-20  9:24 ` [PATCH 4/6] rtla: Always set all tracer options Tomas Glozar
2025-03-20 20:31   ` John Kacur
2025-03-20  9:24 ` [PATCH 5/6] rtla/tests: Reset osnoise options before check Tomas Glozar
2025-03-20 20:36   ` John Kacur
2025-03-20  9:25 ` [PATCH 6/6] rtla/tests: Test setting default options Tomas Glozar
2025-03-20 20:42   ` John Kacur

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).