linux-stable/tools/tracing/rtla
Daniel Bristot de Oliveira a23c05fd76 tools/rtla: Add -U/--user-load option to timerlat
The timerlat tracer provides an interface for any application to wait
for the timerlat's periodic wakeup. Currently, rtla timerlat uses it
to dispatch its user-space workload (-u option).

But as the tracer interface is generic, rtla timerlat can also be used
to monitor any workload that uses it. For example, a user might
place their own workload to wait on the tracer interface, and
monitor the results with rtla timerlat.

Add the -U option to rtla timerlat top and hist. With this option, rtla
timerlat will not dispatch its workload but only setting up the
system, waiting for a user to dispatch its workload.

The sample code in this patch is an example of python application
that loops in the timerlat tracer fd.

To use it, dispatch:

 # rtla timerlat -U

In a terminal, then run the python program on another terminal,
specifying the CPU to run it. For example, setting on CPU 1:

 #./timerlat_load.py 1

Then rtla timerlat will start printing the statistics of the
./timerlat_load.py app.

An interesting point is that the "Ret user Timer Latency" value
is the overall response time of the load. The sample load does
a memory copy to exemplify that.

The stop tracing options on rtla timerlat works in this setup
as well, including auto analysis.

Link: https://lkml.kernel.org/r/36e6bcf18fe15c7601048fd4c65aeb193c502cc8.1707229706.git.bristot@kernel.org

Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: Daniel Bristot de Oliveira <bristot@kernel.org>
2024-03-20 05:39:06 +01:00
..
sample tools/rtla: Add -U/--user-load option to timerlat 2024-03-20 05:39:06 +01:00
src tools/rtla: Add -U/--user-load option to timerlat 2024-03-20 05:39:06 +01:00
.gitignore tools/rtla: Use tools/build makefiles to build rtla 2024-03-20 05:39:06 +01:00
Build tools/rtla: Use tools/build makefiles to build rtla 2024-03-20 05:39:06 +01:00
Makefile tools/rtla: Use tools/build makefiles to build rtla 2024-03-20 05:39:06 +01:00
Makefile.config tools/rtla: Use tools/build makefiles to build rtla 2024-03-20 05:39:06 +01:00
Makefile.rtla tools/rtla: Use tools/build makefiles to build rtla 2024-03-20 05:39:06 +01:00
Makefile.standalone tools/rtla: Use tools/build makefiles to build rtla 2024-03-20 05:39:06 +01:00
README.txt rtla: Remove procps-ng dependency 2022-05-26 15:20:46 -04:00

README.txt

RTLA: Real-Time Linux Analysis tools

The rtla meta-tool includes a set of commands that aims to analyze
the real-time properties of Linux. Instead of testing Linux as a black box,
rtla leverages kernel tracing capabilities to provide precise information
about the properties and root causes of unexpected results.

Installing RTLA

RTLA depends on the following libraries and tools:

 - libtracefs
 - libtraceevent

It also depends on python3-docutils to compile man pages.

For development, we suggest the following steps for compiling rtla:

  $ git clone git://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git
  $ cd libtraceevent/
  $ make
  $ sudo make install
  $ cd ..
  $ git clone git://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git
  $ cd libtracefs/
  $ make
  $ sudo make install
  $ cd ..
  $ cd $rtla_src
  $ make
  $ sudo make install

For further information, please refer to the rtla man page.