linux-stable/tools/tracing/rtla/src
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
..
Build tools/rtla: Use tools/build makefiles to build rtla 2024-03-20 05:39:06 +01:00
osnoise.c rtla/timerlat_top: Add timerlat user-space support 2023-06-13 16:38:51 -04:00
osnoise.h rtla/timerlat_top: Add timerlat user-space support 2023-06-13 16:38:51 -04:00
osnoise_hist.c tools/rtla: Exit with EXIT_SUCCESS when help is invoked 2024-02-12 10:59:09 +01:00
osnoise_top.c tools/rtla: Exit with EXIT_SUCCESS when help is invoked 2024-02-12 10:59:09 +01:00
rtla.c rtla: Add hwnoise tool 2023-02-13 23:56:46 -05:00
timerlat.c rtla: Fix exit status when returning from calls to usage() 2022-12-09 18:06:24 -05:00
timerlat.h rtla/timerlat: Add timerlat hist mode 2022-01-13 17:02:43 -05:00
timerlat_aa.c rtla/timerlat_aa: Fix previous IRQ delay for IRQs that happens after thread sample 2023-09-12 15:43:17 +02:00
timerlat_aa.h rtla/timerlat: Give timerlat auto analysis its own instance 2023-06-13 16:31:35 -04:00
timerlat_hist.c tools/rtla: Add -U/--user-load option to timerlat 2024-03-20 05:39:06 +01:00
timerlat_top.c tools/rtla: Add -U/--user-load option to timerlat 2024-03-20 05:39:06 +01:00
timerlat_u.c rtla/timerlat: Do not stop user-space if a cpu is offline 2023-09-22 14:43:46 +02:00
timerlat_u.h rtla/timerlat_top: Add timerlat user-space support 2023-06-13 16:38:51 -04:00
trace.c rtla: Fix double free 2022-07-31 17:03:38 -04:00
trace.h rtla: Check for trace off also in the trace instance 2022-03-15 14:36:50 -04:00
utils.c tools/rtla: Replace setting prio with nice for SCHED_OTHER 2024-02-12 10:56:36 +01:00
utils.h tools/rtla: Replace setting prio with nice for SCHED_OTHER 2024-02-12 10:56:36 +01:00