|
Revision tags: v6.15, v6.15-rc7, v6.15-rc6, v6.15-rc5, v6.15-rc4, v6.15-rc3, v6.15-rc2, v6.15-rc1, v6.14 |
|
| #
20d6b075 |
| 20-Mar-2025 |
Tomas Glozar <[email protected]> |
rtla: Unify apply_config between top and hist
The functions osnoise_top_apply_config and osnoise_hist_apply_config, as well as timerlat_top_apply_config and timerlat_hist_apply_config, are mostly th
rtla: Unify apply_config between top and hist
The functions osnoise_top_apply_config and osnoise_hist_apply_config, as well as timerlat_top_apply_config and timerlat_hist_apply_config, are mostly the same.
Move common part from them into separate functions osnoise_apply_config and timerlat_apply_config.
For rtla-timerlat, also unify params->user_hist and params->user_top into one field called params->user_data, and move several fields used only by timerlat-top into the top-only section of struct timerlat_params.
Cc: Luis Goncalves <[email protected]> Link: https://lore.kernel.org/[email protected] Signed-off-by: Tomas Glozar <[email protected]> Reviewed-by: John Kacur <[email protected]> Signed-off-by: Steven Rostedt (Google) <[email protected]>
show more ...
|
|
Revision tags: v6.14-rc7 |
|
| #
c57c58a6 |
| 13-Mar-2025 |
Tomas Glozar <[email protected]> |
rtla: Fix segfault in save_trace_to_file call
Running rtla with exit on threshold, but without saving trace leads to a segmenetation fault:
$ rtla timerlat hist -T 10 ... Max timerlat IRQ latency f
rtla: Fix segfault in save_trace_to_file call
Running rtla with exit on threshold, but without saving trace leads to a segmenetation fault:
$ rtla timerlat hist -T 10 ... Max timerlat IRQ latency from idle: 4.29 us in cpu 0 Segmentation fault
This is caused by null pointer deference in the call of save_trace_to_file, which attempts to dereference an uninitialized osnoise_tool variable:
save_trace_to_file(record->trace.inst, params->trace_output); ^ this is uninitialized if params->trace_output is not set
Fix this by not attempting to dereference "record" if it is NULL and passing NULL instead. As a safety measure, the first field is also checked for NULL inside save_trace_to_file.
Cc: John Kacur <[email protected]> Cc: Luis Goncalves <[email protected]> Cc: Costa Shulyupin <[email protected]> Link: https://lore.kernel.org/[email protected] Fixes: dc4d4e7c72d1 ("rtla: Refactor save_trace_to_file") Signed-off-by: Tomas Glozar <[email protected]> Signed-off-by: Steven Rostedt (Google) <[email protected]>
show more ...
|
|
Revision tags: v6.14-rc6, v6.14-rc5, v6.14-rc4 |
|
| #
dc4d4e7c |
| 19-Feb-2025 |
Costa Shulyupin <[email protected]> |
rtla: Refactor save_trace_to_file
The functions osnoise_hist_main(), osnoise_top_main(), timerlat_hist_main(), and timerlat_top_main() are lengthy and contain duplicated code.
Refactor by consolida
rtla: Refactor save_trace_to_file
The functions osnoise_hist_main(), osnoise_top_main(), timerlat_hist_main(), and timerlat_top_main() are lengthy and contain duplicated code.
Refactor by consolidating the duplicate lines into the save_trace_to_file() function.
Cc: Daniel Bristot de Oliveira <[email protected]> Cc: John Kacur <[email protected]> Cc: "Luis Claudio R. Goncalves" <[email protected]> Cc: Eder Zulian <[email protected]> Cc: Dan Carpenter <[email protected]> Cc: Gabriele Monaco <[email protected]> Link: https://lore.kernel.org/[email protected] Signed-off-by: Costa Shulyupin <[email protected]> Reviewed-by: Tomas Glozar <[email protected]> Tested-by: Tomas Glozar <[email protected]> Signed-off-by: Steven Rostedt (Google) <[email protected]>
show more ...
|
| #
fd7925cb |
| 18-Feb-2025 |
Tomas Glozar <[email protected]> |
rtla/timerlat_hist: Use BPF to collect samples
Collect samples using BPF program instead of pulling them from tracefs.
If the osnoise:timerlat_sample tracepoint is unavailable or the BPF program fa
rtla/timerlat_hist: Use BPF to collect samples
Collect samples using BPF program instead of pulling them from tracefs.
If the osnoise:timerlat_sample tracepoint is unavailable or the BPF program fails to load for whatever reason, rtla falls back to the old implementation.
The collection of samples using the BPF program is fully self-contained and requires no activity of the userspace part of rtla during the measurement. Thus, instead of waking up every second to collect samples, rtla simply sleeps until woken up by a signal or threshold overflow.
Cc: John Kacur <[email protected]> Cc: Luis Goncalves <[email protected]> Cc: Gabriele Monaco <[email protected]> Cc: Clark Williams <[email protected]> Link: https://lore.kernel.org/[email protected] Signed-off-by: Tomas Glozar <[email protected]> Signed-off-by: Steven Rostedt (Google) <[email protected]>
show more ...
|
| #
6fa5e3a8 |
| 18-Feb-2025 |
Tomas Glozar <[email protected]> |
rtla/timerlat: Unify params struct
Instead of having separate structs timerlat_top_params and timerlat_hist_params, use one struct timerlat_params for both.
This allows code using the structs to be
rtla/timerlat: Unify params struct
Instead of having separate structs timerlat_top_params and timerlat_hist_params, use one struct timerlat_params for both.
This allows code using the structs to be shared between timerlat-top and timerlat-hist.
Cc: John Kacur <[email protected]> Cc: Luis Goncalves <[email protected]> Cc: Gabriele Monaco <[email protected]> Cc: Clark Williams <[email protected]> Link: https://lore.kernel.org/[email protected] Signed-off-by: Tomas Glozar <[email protected]> Signed-off-by: Steven Rostedt (Google) <[email protected]>
show more ...
|
|
Revision tags: v6.14-rc3, v6.14-rc2, v6.14-rc1 |
|
| #
cf186201 |
| 23-Jan-2025 |
Tomas Glozar <[email protected]> |
rtla: Report missed event count
Print how many events were missed by trace buffer overflow in the main instance at the end of the run (for hist) or during the run (for top).
Cc: John Kacur <jkacur@
rtla: Report missed event count
Print how many events were missed by trace buffer overflow in the main instance at the end of the run (for hist) or during the run (for top).
Cc: John Kacur <[email protected]> Cc: Luis Goncalves <[email protected]> Link: https://lore.kernel.org/[email protected] Signed-off-by: Tomas Glozar <[email protected]> Tested-by: Gabriele Monaco <[email protected]> Signed-off-by: Steven Rostedt (Google) <[email protected]>
show more ...
|
|
Revision tags: v6.13 |
|
| #
b91cfd9f |
| 15-Jan-2025 |
Costa Shulyupin <[email protected]> |
tools/rtla: Add osnoise_trace_is_off()
All of the users of trace_is_off() passes in &record->trace as the second parameter, where record is a pointer to a struct osnoise_tool. This record could be N
tools/rtla: Add osnoise_trace_is_off()
All of the users of trace_is_off() passes in &record->trace as the second parameter, where record is a pointer to a struct osnoise_tool. This record could be NULL and there is a hidden dependency that the trace field is the first field to allow &record->trace to work with a NULL record pointer.
In order to make this code a bit more robust, as record shouldn't be dereferenced if it is NULL, even if the code does work, create a new function called osnoise_trace_is_off() that takes the pointer to a struct osnoise_tool as its second parameter. This way it can properly test if it is NULL before it dereferences it.
The old function trace_is_off() is removed and the function osnoise_trace_is_off() is added into osnoise.c which is what the struct osnoise_tool is associated with.
Cc: John Kacur <[email protected]> Cc: "Luis Claudio R. Goncalves" <[email protected]> Cc: Eder Zulian <[email protected]> Cc: Dan Carpenter <[email protected]> Cc: Tomas Glozar <[email protected]> Cc: Gabriele Monaco <[email protected]> Link: https://lore.kernel.org/[email protected] Signed-off-by: Costa Shulyupin <[email protected]> Signed-off-by: Steven Rostedt (Google) <[email protected]>
show more ...
|
|
Revision tags: v6.13-rc7 |
|
| #
d8d86617 |
| 07-Jan-2025 |
Tomas Glozar <[email protected]> |
rtla/timerlat_hist: Set OSNOISE_WORKLOAD for kernel threads
When using rtla timerlat with userspace threads (-u or -U), rtla disables the OSNOISE_WORKLOAD option in /sys/kernel/tracing/osnoise/optio
rtla/timerlat_hist: Set OSNOISE_WORKLOAD for kernel threads
When using rtla timerlat with userspace threads (-u or -U), rtla disables the OSNOISE_WORKLOAD option in /sys/kernel/tracing/osnoise/options. This option is not re-enabled in a subsequent run with kernel-space threads, leading to rtla collecting no results if the previous run exited abnormally:
$ rtla timerlat hist -u ^\Quit (core dumped) $ rtla timerlat hist -k -d 1s Index over: count: min: avg: max: ALL: IRQ Thr Usr count: 0 0 0 min: - - - avg: - - - max: - - -
The issue persists until OSNOISE_WORKLOAD is set manually by running: $ echo OSNOISE_WORKLOAD > /sys/kernel/tracing/osnoise/options
Set OSNOISE_WORKLOAD when running rtla with kernel-space threads if available to fix the issue.
Cc: [email protected] Cc: John Kacur <[email protected]> Cc: Luis Goncalves <[email protected]> Link: https://lore.kernel.org/[email protected] Fixes: ed774f7481fa ("rtla/timerlat_hist: Add timerlat user-space support") Signed-off-by: Tomas Glozar <[email protected]> Signed-off-by: Steven Rostedt (Google) <[email protected]>
show more ...
|
| #
d6899e56 |
| 16-Jan-2025 |
Tomas Glozar <[email protected]> |
rtla/timerlat_hist: Abort event processing on second signal
If either SIGINT is received twice, or after a SIGALRM (that is, after timerlat was supposed to stop), abort processing events currently l
rtla/timerlat_hist: Abort event processing on second signal
If either SIGINT is received twice, or after a SIGALRM (that is, after timerlat was supposed to stop), abort processing events currently left in the tracefs buffer and exit immediately.
This allows the user to exit rtla without waiting for processing all events, should that take longer than wanted, at the cost of not processing all samples.
Cc: John Kacur <[email protected]> Cc: Luis Goncalves <[email protected]> Cc: Gabriele Monaco <[email protected]> Link: https://lore.kernel.org/[email protected] Signed-off-by: Tomas Glozar <[email protected]> Signed-off-by: Steven Rostedt (Google) <[email protected]>
show more ...
|
| #
c73cab9d |
| 16-Jan-2025 |
Tomas Glozar <[email protected]> |
rtla/timerlat_hist: Stop timerlat tracer on signal
Currently, when either SIGINT from the user or SIGALRM from the duration timer is caught by rtla-timerlat, stop_tracing is set to break out of the
rtla/timerlat_hist: Stop timerlat tracer on signal
Currently, when either SIGINT from the user or SIGALRM from the duration timer is caught by rtla-timerlat, stop_tracing is set to break out of the main loop. This is not sufficient for cases where the timerlat tracer is producing more data than rtla can consume, since in that case, rtla is looping indefinitely inside tracefs_iterate_raw_events, never reaches the check of stop_tracing and hangs.
In addition to setting stop_tracing, also stop the timerlat tracer on received signal (SIGINT or SIGALRM). This will stop new samples so that the existing samples may be processed and tracefs_iterate_raw_events eventually exits.
Cc: [email protected] Cc: John Kacur <[email protected]> Cc: Luis Goncalves <[email protected]> Cc: Gabriele Monaco <[email protected]> Link: https://lore.kernel.org/[email protected] Fixes: 1eeb6328e8b3 ("rtla/timerlat: Add timerlat hist mode") Signed-off-by: Tomas Glozar <[email protected]> Signed-off-by: Steven Rostedt (Google) <[email protected]>
show more ...
|
|
Revision tags: v6.13-rc6, v6.13-rc5, v6.13-rc4, v6.13-rc3, v6.13-rc2, v6.13-rc1 |
|
| #
6cc45f8c |
| 27-Nov-2024 |
Tomas Glozar <[email protected]> |
rtla/timerlat: Fix histogram ALL for zero samples
rtla timerlat hist currently computers the minimum, maximum and average latency even in cases when there are zero samples. This leads to nonsensical
rtla/timerlat: Fix histogram ALL for zero samples
rtla timerlat hist currently computers the minimum, maximum and average latency even in cases when there are zero samples. This leads to nonsensical values being calculated for maximum and minimum, and to divide by zero for average.
A similar bug is fixed by 01b05fc0e5f3 ("rtla/timerlat: Fix histogram report when a cpu count is 0") but the bug still remains for printing the sum over all CPUs in timerlat_print_stats_all.
The issue can be reproduced with this command:
$ rtla timerlat hist -U -d 1s Index over: count: min: avg: max: Floating point exception (core dumped)
(There are always no samples with -U unless the user workload is created.)
Fix the bug by omitting max/min/avg when sample count is zero, displaying a dash instead, just like we already do for the individual CPUs. The logic is moved into a new function called format_summary_value, which is used for both the individual CPUs and for the overall summary.
Cc: [email protected] Link: https://lore.kernel.org/[email protected] Fixes: 1462501c7a8 ("rtla/timerlat: Add a summary for hist mode") Signed-off-by: Tomas Glozar <[email protected]> Signed-off-by: Steven Rostedt (Google) <[email protected]>
show more ...
|
|
Revision tags: v6.12, v6.12-rc7, v6.12-rc6, v6.12-rc5 |
|
| #
fcbc60d7 |
| 21-Oct-2024 |
Tomas Glozar <[email protected]> |
rtla/timerlat: Do not set params->user_workload with -U
Since commit fb9e90a67ee9 ("rtla/timerlat: Make user-space threads the default"), rtla-timerlat has been defaulting to params->user_workload i
rtla/timerlat: Do not set params->user_workload with -U
Since commit fb9e90a67ee9 ("rtla/timerlat: Make user-space threads the default"), rtla-timerlat has been defaulting to params->user_workload if neither that or params->kernel_workload is set. This has unintentionally made -U, which sets only params->user_hist/top but not params->user_workload, to behave like -u unless -k is set, preventing the user from running a custom workload.
Example: $ rtla timerlat hist -U -c 0 & [1] 7413 $ python sample/timerlat_load.py 0 Error opening timerlat fd, did you run timerlat -U? $ ps | grep timerlatu 7415 pts/4 00:00:00 timerlatu/0
Fix the issue by checking for params->user_top/hist instead of params->user_workload when setting default thread mode.
Link: https://lore.kernel.org/[email protected] Fixes: fb9e90a67ee9 ("rtla/timerlat: Make user-space threads the default") Signed-off-by: Tomas Glozar <[email protected]> Signed-off-by: Steven Rostedt (Google) <[email protected]>
show more ...
|
|
Revision tags: v6.12-rc4 |
|
| #
cfbfbfc9 |
| 17-Oct-2024 |
Tomas Glozar <[email protected]> |
rtla/timerlat: Add --deepest-idle-state for hist
Support limiting deepest idle state also for timerlat-hist.
Link: https://lore.kernel.org/[email protected] Signed-off-by:
rtla/timerlat: Add --deepest-idle-state for hist
Support limiting deepest idle state also for timerlat-hist.
Link: https://lore.kernel.org/[email protected] Signed-off-by: Tomas Glozar <[email protected]> Signed-off-by: Steven Rostedt (Google) <[email protected]>
show more ...
|
|
Revision tags: v6.12-rc3 |
|
| #
76b31021 |
| 11-Oct-2024 |
Tomas Glozar <[email protected]> |
rtla/timerlat: Make timerlat_hist_cpu->*_count unsigned long long
Do the same fix as in previous commit also for timerlat-hist.
Link: https://lore.kernel.org/20241011121015.2868751-2-tglozar@redhat
rtla/timerlat: Make timerlat_hist_cpu->*_count unsigned long long
Do the same fix as in previous commit also for timerlat-hist.
Link: https://lore.kernel.org/[email protected] Reported-by: Attila Fazekas <[email protected]> Signed-off-by: Tomas Glozar <[email protected]> Signed-off-by: Steven Rostedt (Google) <[email protected]>
show more ...
|
|
Revision tags: v6.12-rc2, v6.12-rc1 |
|
| #
cfb1ea21 |
| 26-Sep-2024 |
Gabriele Monaco <[email protected]> |
rtla: Fix consistency in getopt_long for timerlat_hist
Commit e9a4062e1527 ("rtla: Add --trace-buffer-size option") adds a new long option to rtla utilities, but among all affected files, timerlat_h
rtla: Fix consistency in getopt_long for timerlat_hist
Commit e9a4062e1527 ("rtla: Add --trace-buffer-size option") adds a new long option to rtla utilities, but among all affected files, timerlat_hist misses a trailing `:` in the corresponding short option inside the getopt string (e.g. `\3:`). This patch propagates the `:`.
Although this change is not functionally required, it improves consistency and slightly reduces the likelihood a future change would introduce a problem.
Cc: John Kacur <[email protected]> Cc: Luis Goncalves <[email protected]> Cc: Tomas Glozar <[email protected]> Link: https://lore.kernel.org/[email protected] Signed-off-by: Gabriele Monaco <[email protected]> Signed-off-by: Steven Rostedt (Google) <[email protected]>
show more ...
|
|
Revision tags: v6.11, v6.11-rc7, v6.11-rc6, v6.11-rc5, v6.11-rc4, v6.11-rc3, v6.11-rc2, v6.11-rc1, v6.10, v6.10-rc7, v6.10-rc6, v6.10-rc5, v6.10-rc4, v6.10-rc3, v6.10-rc2, v6.10-rc1 |
|
| #
842fc5b8 |
| 15-May-2024 |
John Kacur <[email protected]> |
rtla: Fix -t\--trace[=file]
The -t option has an optional argument. The usual case is for a short option to be specified without an '=' and for the long version to be specified with an '='
Various
rtla: Fix -t\--trace[=file]
The -t option has an optional argument. The usual case is for a short option to be specified without an '=' and for the long version to be specified with an '='
Various forms of this do not work as expected. For example: rtla timerlat hist -T50 -tfile.txt will result in a truncated file name of "ile.txt"
Another example is that the long form without the '=' will result in the default file name instead of the requested file name.
This patch properly parses the optional argument with and without '=' and with and without spaces for the short form.
This patch was also tested using -t and --trace without providing a file name both as the last requested option and with a following long and short option.
For example:
rtla timerlat hist -T50 -t -u rtla timerlat hist -T50 --trace -u
This fix is applied to both timerlat top and hist and to osnoise top and hist.
Here is the full testing for rtla timerlat hist. Before applying the patch
rtla timerlat hist -T50 -t=file.txt Works as expected, "file.txt"
rtla timerlat hist -T50 -tfile.txt Truncated file name "ile.txt"
rtla timerlat hist -T50 -t file.txt Default file name instead of file.txt
rtla timerlat hist -T50 --trace=file.txt Truncated file name "ile.txt"
rtla timerlat hist -T50 --trace file.txt Default file name "timerlat_trace.txt" instead of "file.txt"
After applying the patch:
rtla timerlat hist -T50 -t=file.txt Works as expected, "file.txt"
rtla timerlat hist -T50 -tfile.txt Works as expected, "file.txt"
rtla timerlat hist -T50 -t file.txt Works as expected, "file.txt"
rtla timerlat hist -T50 --trace=file.txt Works as expected, "file.txt"
rtla timerlat hist -T50 --trace file.txt Works as expected, "file.txt"
In addition the following tests were performed to make sure that the default file name worked as expected including with trailing options.
rtla timerlat hist -T50 -t Works as expected "timerlat_trace.txt"
rtla timerlat hist -T50 --trace Works as expected "timerlat_trace.txt"
rtla timerlat hist -T50 -t -u Works as expected "timerlat_trace.txt"
rtla timerlat hist -T50 --trace -u Works as expected "timerlat_trace.txt"
Link: https://lkml.kernel.org/r/[email protected]
Cc: Daniel Bristot de Oliveria <[email protected]> Signed-off-by: John Kacur <[email protected]> Signed-off-by: Daniel Bristot de Oliveira <[email protected]>
show more ...
|
|
Revision tags: v6.9 |
|
| #
01b05fc0 |
| 10-May-2024 |
John Kacur <[email protected]> |
rtla/timerlat: Fix histogram report when a cpu count is 0
On short runs it is possible to get no samples on a cpu, like this:
# rtla timerlat hist -u -T50
Index IRQ-001 Thr-001 Usr-001
rtla/timerlat: Fix histogram report when a cpu count is 0
On short runs it is possible to get no samples on a cpu, like this:
# rtla timerlat hist -u -T50
Index IRQ-001 Thr-001 Usr-001 IRQ-002 Thr-002 Usr-002 2 1 0 0 0 0 0 33 0 1 0 0 0 0 36 0 0 1 0 0 0 49 0 0 0 1 0 0 52 0 0 0 0 1 0 over: 0 0 0 0 0 0 count: 1 1 1 1 1 0 min: 2 33 36 49 52 18446744073709551615 avg: 2 33 36 49 52 - max: 2 33 36 49 52 0 rtla timerlat hit stop tracing IRQ handler delay: (exit from idle) 48.21 us (91.09 %) IRQ latency: 49.11 us Timerlat IRQ duration: 2.17 us (4.09 %) Blocking thread: 1.01 us (1.90 %) swapper/2:0 1.01 us ------------------------------------------------------------------------ Thread latency: 52.93 us (100%)
Max timerlat IRQ latency from idle: 49.11 us in cpu 2
Note, the value 18446744073709551615 is the same as ~0.
Fix this by reporting no results for the min, avg and max if the count is 0.
Link: https://lkml.kernel.org/r/[email protected]
Cc: [email protected] Fixes: 1eeb6328e8b3 ("rtla/timerlat: Add timerlat hist mode") Suggested-by: Daniel Bristot de Oliveria <[email protected]> Signed-off-by: John Kacur <[email protected]> Signed-off-by: Daniel Bristot de Oliveira <[email protected]>
show more ...
|
| #
e9a4062e |
| 16-May-2024 |
Daniel Bristot de Oliveira <[email protected]> |
rtla: Add --trace-buffer-size option
Add the option allow the users to set a different buffer size for the trace. For example, in large systems, the user might be interested on reducing the trace bu
rtla: Add --trace-buffer-size option
Add the option allow the users to set a different buffer size for the trace. For example, in large systems, the user might be interested on reducing the trace buffer to avoid large tracing files.
The buffer size is specified in kB, and it is only affecting the tracing instance.
The function trace_set_buffer_size() appears on libtracefs v1.6, so increase the minimum required version on Makefile.config.
Link: https://lkml.kernel.org/r/e7c9ca5b3865f28e131a49ec3b984fadf2d056c6.1715860611.git.bristot@kernel.org
Cc: Jonathan Corbet <[email protected]> Cc: Juri Lelli <[email protected]> Cc: John Kacur <[email protected]> Signed-off-by: Daniel Bristot de Oliveira <[email protected]>
show more ...
|
|
Revision tags: v6.9-rc7, v6.9-rc6 |
|
| #
fb9e90a6 |
| 24-Apr-2024 |
Daniel Bristot de Oliveira <[email protected]> |
rtla/timerlat: Make user-space threads the default
After ther -u addition, most of the known users are setting it. And it makes sense, as it adds more information, and inherits the default setup for
rtla/timerlat: Make user-space threads the default
After ther -u addition, most of the known users are setting it. And it makes sense, as it adds more information, and inherits the default setup for the threads - e.g., cgroups configs.
Thus, if the user-space interface is available, enable -u. Otherwise, use the in-kernel thread.
Add the -k option to allow the user to request kernel-threads.
Link: https://lkml.kernel.org/r/9241d3089de4091b124f780ed832a0e6646cadaa.1713968967.git.bristot@kernel.org
Cc: Jonathan Corbet <[email protected]> Cc: Juri Lelli <[email protected]> Signed-off-by: Daniel Bristot de Oliveira <[email protected]>
show more ...
|
| #
cdbf7196 |
| 24-Apr-2024 |
Daniel Bristot de Oliveira <[email protected]> |
rtla: Add the --warm-up option
On many cases, the results right after the startup are different from the rest of the execution, biasing the results. For example, on osnoise, the scheduler might take
rtla: Add the --warm-up option
On many cases, the results right after the startup are different from the rest of the execution, biasing the results. For example, on osnoise, the scheduler might take some time to adapt to the new busy-loop workload.
Add the --warm-up <seconds> option, adding a warm-up phase (in seconds) where the workload is set, but the results are discarded.
Link: https://lkml.kernel.org/r/e682d5ce5af90f123bd13220f63d5c3d118a92be.1713968967.git.bristot@kernel.org
Cc: Jonathan Corbet <[email protected]> Cc: Juri Lelli <[email protected]> Signed-off-by: Daniel Bristot de Oliveira <[email protected]>
show more ...
|
| #
1462501c |
| 24-Apr-2024 |
Daniel Bristot de Oliveira <[email protected]> |
rtla/timerlat: Add a summary for hist mode
Like on rtla timerlat top, add an overall summary at the bottom of timerlat hist. For instance:
# timerlat hist -c 0-1 -d 10s -E 20 # RTLA timerlat hi
rtla/timerlat: Add a summary for hist mode
Like on rtla timerlat top, add an overall summary at the bottom of timerlat hist. For instance:
# timerlat hist -c 0-1 -d 10s -E 20 # RTLA timerlat histogram # Time unit is microseconds (us) # Duration: 0 00:00:10 Index IRQ-000 Thr-000 IRQ-001 Thr-001 6 1 0 0 0 7 1 0 0 0 8 1 0 1 0 9 7 0 0 0 10 16 0 0 0 11 1 0 3 0 15 0 0 3 0 16 0 0 12 0 17 0 0 28 0 18 0 2 26 0 19 1 1 80 1 over: 9973 9998 9848 10000 count: 10001 10001 10001 10001 min: 6 18 8 19 avg: 185 204 95 113 max: 428 450 341 371 ALL: IRQ Thr count: 20002 20002 min: 6 18 avg: 140 159 max: 428 450
Link: https://lkml.kernel.org/r/a6bc06c798f72127edc57d1f99da8d57e1187cee.1713968967.git.bristot@kernel.org
Cc: Jonathan Corbet <[email protected]> Suggested-by: Juri Lelli <[email protected]> Signed-off-by: Daniel Bristot de Oliveira <[email protected]>
show more ...
|
|
Revision tags: v6.9-rc5, v6.9-rc4, v6.9-rc3, v6.9-rc2, v6.9-rc1, v6.8, v6.8-rc7, v6.8-rc6, v6.8-rc5, v6.8-rc4 |
|
| #
a23c05fd |
| 06-Feb-2024 |
Daniel Bristot de Oliveira <[email protected]> |
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 dispat
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 <[email protected]> Cc: Masami Hiramatsu <[email protected]> Signed-off-by: Daniel Bristot de Oliveira <[email protected]>
show more ...
|
|
Revision tags: v6.8-rc3 |
|
| #
b5f31936 |
| 03-Feb-2024 |
John Kacur <[email protected]> |
tools/rtla: Exit with EXIT_SUCCESS when help is invoked
Fix rtla so that the following commands exit with 0 when help is invoked
rtla osnoise top -h rtla osnoise hist -h rtla timerlat top -h rtla t
tools/rtla: Exit with EXIT_SUCCESS when help is invoked
Fix rtla so that the following commands exit with 0 when help is invoked
rtla osnoise top -h rtla osnoise hist -h rtla timerlat top -h rtla timerlat hist -h
Link: https://lore.kernel.org/linux-trace-devel/[email protected]
Cc: [email protected] Fixes: 1eeb6328e8b3 ("rtla/timerlat: Add timerlat hist mode") Signed-off-by: John Kacur <[email protected]> Signed-off-by: Daniel Bristot de Oliveira <[email protected]>
show more ...
|
| #
64dc40f7 |
| 06-Feb-2024 |
Daniel Bristot de Oliveira <[email protected]> |
tools/rtla: Fix uninitialized bucket/data->bucket_size warning
When compiling rtla with clang, I am getting the following warnings:
$ make HOSTCC=clang CC=clang LLVM_IAS=1
[..] clang -O -g -DVERSI
tools/rtla: Fix uninitialized bucket/data->bucket_size warning
When compiling rtla with clang, I am getting the following warnings:
$ make HOSTCC=clang CC=clang LLVM_IAS=1
[..] clang -O -g -DVERSION=\"6.8.0-rc3\" -flto=auto -fexceptions -fstack-protector-strong -fasynchronous-unwind-tables -fstack-clash-protection -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS $(pkg-config --cflags libtracefs) -c -o src/osnoise_hist.o src/osnoise_hist.c src/osnoise_hist.c:138:6: warning: variable 'bucket' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized] 138 | if (data->bucket_size) | ^~~~~~~~~~~~~~~~~ src/osnoise_hist.c:149:6: note: uninitialized use occurs here 149 | if (bucket < entries) | ^~~~~~ src/osnoise_hist.c:138:2: note: remove the 'if' if its condition is always true 138 | if (data->bucket_size) | ^~~~~~~~~~~~~~~~~~~~~~ 139 | bucket = duration / data->bucket_size; src/osnoise_hist.c:132:12: note: initialize the variable 'bucket' to silence this warning 132 | int bucket; | ^ | = 0 1 warning generated.
[...]
clang -O -g -DVERSION=\"6.8.0-rc3\" -flto=auto -fexceptions -fstack-protector-strong -fasynchronous-unwind-tables -fstack-clash-protection -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS $(pkg-config --cflags libtracefs) -c -o src/timerlat_hist.o src/timerlat_hist.c src/timerlat_hist.c:181:6: warning: variable 'bucket' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized] 181 | if (data->bucket_size) | ^~~~~~~~~~~~~~~~~ src/timerlat_hist.c:204:6: note: uninitialized use occurs here 204 | if (bucket < entries) | ^~~~~~ src/timerlat_hist.c:181:2: note: remove the 'if' if its condition is always true 181 | if (data->bucket_size) | ^~~~~~~~~~~~~~~~~~~~~~ 182 | bucket = latency / data->bucket_size; src/timerlat_hist.c:175:12: note: initialize the variable 'bucket' to silence this warning 175 | int bucket; | ^ | = 0 1 warning generated.
This is a legit warning, but data->bucket_size is always > 0 (see timerlat_hist_parse_args()), so the if is not necessary.
Remove the unneeded if (data->bucket_size) to avoid the warning.
Link: https://lkml.kernel.org/r/6e1b1665cd99042ae705b3e0fc410858c4c42346.1707217097.git.bristot@kernel.org
Cc: [email protected] Cc: Masami Hiramatsu <[email protected]> Cc: Nathan Chancellor <[email protected]> Cc: Nick Desaulniers <[email protected]> Cc: Bill Wendling <[email protected]> Cc: Justin Stitt <[email protected]> Cc: Donald Zickus <[email protected]> Fixes: 1eeb6328e8b3 ("rtla/timerlat: Add timerlat hist mode") Fixes: 829a6c0b5698 ("rtla/osnoise: Add the hist mode") Signed-off-by: Daniel Bristot de Oliveira <[email protected]>
show more ...
|
|
Revision tags: v6.8-rc2, v6.8-rc1, v6.7, v6.7-rc8, v6.7-rc7, v6.7-rc6, v6.7-rc5, v6.7-rc4, v6.7-rc3, v6.7-rc2, v6.7-rc1, v6.6, v6.6-rc7, v6.6-rc6, v6.6-rc5, v6.6-rc4, v6.6-rc3, v6.6-rc2, v6.6-rc1, v6.5, v6.5-rc7, v6.5-rc6, v6.5-rc5, v6.5-rc4, v6.5-rc3, v6.5-rc2, v6.5-rc1, v6.4, v6.4-rc7, v6.4-rc6 |
|
| #
ed774f74 |
| 06-Jun-2023 |
Daniel Bristot de Oliveira <[email protected]> |
rtla/timerlat_hist: Add timerlat user-space support
Add the support for running timerlat threads in user-space. In this mode, enabled with -u/--user-threads, timerlat dispatches user-space processes
rtla/timerlat_hist: Add timerlat user-space support
Add the support for running timerlat threads in user-space. In this mode, enabled with -u/--user-threads, timerlat dispatches user-space processes that will loop in the timerlat_fd, measuring the overhead for going to user-space and then returning to the kernel - in addition to the existing measurements.
Here is one example of the tool's output with -u enabled:
$ sudo timerlat hist -u -c 1-3 -d 600 # RTLA timerlat histogram # Time unit is microseconds (us) # Duration: 0 00:10:01 Index IRQ-001 Thr-001 Usr-001 IRQ-002 Thr-002 Usr-002 IRQ-003 Thr-003 Usr-003 0 477555 0 0 425287 0 0 474357 0 0 1 122385 7998 0 174616 1921 0 125412 3138 0 2 47 587376 492150 89 594717 447830 147 593463 454872 3 11 2549 101930 7 2682 145580 64 2530 138680 4 3 1954 2833 1 463 4917 11 548 4656 5 0 60 1037 0 138 1117 6 179 1130 6 0 26 1837 0 38 277 1 76 339 7 0 15 143 0 28 147 2 37 156 8 0 10 23 0 11 75 0 12 80 9 0 7 17 0 0 26 0 11 42 10 0 2 11 0 0 18 0 2 20 11 0 0 7 0 1 8 0 2 12 12 0 0 6 0 1 4 0 2 8 13 0 1 3 0 0 0 0 0 1 14 0 1 0 0 0 1 0 0 2 15 0 1 0 0 0 0 0 0 2 16 0 1 2 0 0 0 0 0 0 17 0 0 1 0 0 0 0 0 0 19 0 0 1 0 0 0 0 0 0 over: 0 0 0 0 0 0 0 0 0 count: 600001 600001 600001 600000 600000 600000 600000 600000 600000 min: 0 1 2 0 1 2 0 1 2 avg: 0 1 2 0 2 2 0 2 2 max: 4 16 19 4 12 14 7 12 15
The tuning setup like -p or -C work for the user-space threads as well.
Link: https://lkml.kernel.org/r/b6a042d55003c4a67ff7dce28d96044b7044f00d.1686066600.git.bristot@kernel.org
Cc: William White <[email protected]> Cc: Jonathan Corbet <[email protected]> Tested-by: Juri Lelli <[email protected]> Signed-off-by: Daniel Bristot de Oliveira <[email protected]> Signed-off-by: Steven Rostedt (Google) <[email protected]>
show more ...
|