Skip to content

rtla: Always set all tracer options

Tomas Glozar linux-trace-kernel lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest6 patches 7 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6rtla/osnoise: Unify params structtools/tracing/rtla/src/osnoise.c tools/tracing/rtla/src/osnoise.h tools/tracing/rtla/src/osnoise_hist.c +2 more+68 -872 replies
2/6rtla: Unify apply_config between top and histtools/tracing/rtla/src/osnoise.c tools/tracing/rtla/src/osnoise.h tools/tracing/rtla/src/osnoise_hist.c +5 more+227 -3341 reply
3/6rtla/osnoise: Set OSNOISE_WORKLOAD to truetools/tracing/rtla/src/osnoise.c+6 -01 reply
4/6rtla: Always set all tracer optionstools/tracing/rtla/src/osnoise.c tools/tracing/rtla/src/timerlat.c+56 -591 reply
5/6rtla/tests: Reset osnoise options before checktools/tracing/rtla/tests/engine.sh+40 -01 reply
6/6rtla/tests: Test setting default optionstools/tracing/rtla/tests/engine.sh tools/tracing/rtla/tests/osnoise.t+32 -01 reply

Reviews trailers per patch

5 of 6 patches have a Reviewed-by or Acked-by.

PatchJohn Kacur
1/6R-b
2/6R-b
3/6R-b
4/6R-b
5/6
6/6R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/6] rtla: Always set all tracer options

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/[email protected]/

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(-)
Signature · 1 line
2.48.1