Skip to contentSkip to conversation

tracing/rtla: Updates to the RTLA tool

GIT PULL Merged Steven Rostedt 4 participants 6 messages Mar 21, 2022 – Mar 23, 2022

lore
Share & tools
lore
#0 lore raw

Linus,

I'm sending this as a separate pull request from my normal tracing tree, as it had dependencies to commits in your tree but not in my development branch. As it only affects the tools/ directory, I kept it separate as it has no changes to the kernel itself.

Real Time Linux Analysis Tool updates for 5.18

Changes to RTLA:

- Support for adjusting tracing_threashold

- Add -a (auto) option to make it easier for users to debug in the field

- Add -e option to add more events to the trace

- Add --trigger option to add triggers to events

- Add --filter option to filter events

- Add support to save histograms to the file

- Add --dma-latency to set /dev/cpu_dma_latency

- Other fixes and cleanups

Please pull the latest trace-rtla-v5.18 tree, which can be found at:

git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace.git
trace-rtla-v5.18

Tag SHA1: cc921ea64d6df1bb8955ff5762dbcdc408e34264 Head SHA1: 75016ca3acd0de79868ef5b0694195fe05288ade

Daniel Bristot de Oliveira (15):
rtla/osnoise: Add support to adjust the tracing_thresh rtla/osnoise: Add an option to set the threshold rtla/osnoise: Add the automatic trace option rtla/timerlat: Add the automatic trace option rtla/trace: Add trace events helpers
rtla: Add -e/--event support
rtla/trace: Add trace event trigger helpers
rtla: Add --trigger support
rtla/trace: Add trace event filter helpers
rtla: Add --filter support
rtla/trace: Save event histogram output to a file
rtla: Check for trace off also in the trace instance rtla/osnoise: Fix osnoise hist stop tracing message rtla/timerlat: Add --dma-latency option
rtla: Tools main loop cleanup

----

 Documentation/tools/rtla/common_options.rst        |  19 ++
 .../tools/rtla/common_osnoise_options.rst          |  10 +
 .../tools/rtla/common_timerlat_options.rst         |  12 +
 tools/tracing/rtla/src/osnoise.c                   |  83 +++++
 tools/tracing/rtla/src/osnoise.h                   |   8 +
 tools/tracing/rtla/src/osnoise_hist.c              |  95 +++++-
 tools/tracing/rtla/src/osnoise_top.c               |  91 +++++-
 tools/tracing/rtla/src/timerlat_hist.c             | 108 ++++++-
 tools/tracing/rtla/src/timerlat_top.c              | 103 +++++-
 tools/tracing/rtla/src/trace.c                     | 345 +++++++++++++++++++++
 tools/tracing/rtla/src/trace.h                     |  23 ++
 tools/tracing/rtla/src/utils.c                     |  33 ++
 tools/tracing/rtla/src/utils.h                     |   1 +
 13 files changed, 903 insertions(+), 28 deletions(-)

---------------------------

#1 lore raw
Quoted 5 lines · Steven Rostedt

I'm sending this as a separate pull request from my normal tracing tree, as it had dependencies to commits in your tree but not in my development branch. As it only affects the tools/ directory, I kept it separate as it has no changes to the kernel itself.

Yes, please keep the tooling updates separate from the kernel ones, the way we now for some time have for the perf tooling too.

That said, mentioning the perf tools, I wish the tracing tools would do a bit more package checking and helpful error messages too, rather than just fail with

fatal error: tracefs.h: No such file or directory

when (presumably) libtracefs and friends are needed.

Hmm?

Linus

#2 lore raw
Quoted 14 lines · Linus Torvalds
Quoted 5 lines · Steven Rostedt

I'm sending this as a separate pull request from my normal tracing tree, as it had dependencies to commits in your tree but not in my development branch. As it only affects the tools/ directory, I kept it separate as it has no changes to the kernel itself.

Yes, please keep the tooling updates separate from the kernel ones, the way we now for some time have for the perf tooling too.

That said, mentioning the perf tools, I wish the tracing tools would do a bit more package checking and helpful error messages too, rather than just fail with

Quoted 5 lines

fatal error: tracefs.h: No such file or directory

when (presumably) libtracefs and friends are needed.

Hmm?

Yes, we need to improve the Makefile.

It depends on procps-ng-devel and python3-docutils packages and the latest libtracefs (1.3) and libtraceevent (1.5). There is info about it in the README, but we definitely need to improve the Makefile... I will prioritize that.

-- Daniel

Quoted 1 line

Linus

#3 lore raw
In reply to Linus Torvalds
Quoted 7 lines · On Wed, 23 Mar 2022 11:15:30 -0700 Linus Torvalds…

That said, mentioning the perf tools, I wish the tracing tools would do a bit more package checking and helpful error messages too, rather than just fail with

fatal error: tracefs.h: No such file or directory

when (presumably) libtracefs and friends are needed.

Yes exactly.

Daniel, care to update the Makefile to check for libtracefs and friends and give a more informative message when it fails?

You can look at the trace-cmd Makefile that does so.

-- Steve

#4 lore raw
Quoted 6 lines · Steven Rostedt
Quoted 6 lines

That said, mentioning the perf tools, I wish the tracing tools would do a bit more package checking and helpful error messages too, rather than just fail with

fatal error: tracefs.h: No such file or directory

Quoted 7 lines
Quoted 1 line

when (presumably) libtracefs and friends are needed.

Yes exactly.

Daniel, care to update the Makefile to check for libtracefs and friends and give a more informative message when it fails?

You can look at the trace-cmd Makefile that does so.

Working on that!

-- Daniel

merge bot Merged
#5 lore raw
In reply to Steven Rostedt
The pull request you sent on Mon, 21 Mar 2022 10:30:35 -0400:

The pull request you sent on Mon, 21 Mar 2022 10:30:35 -0400:

Quoted 1 line

git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace.git trace-rtla-v5.18

has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/20f463fb38686dd3fe7e6903cab56bdbbf756238

Thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/prtracker.html