|
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, 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 ...
|
|
Revision tags: v6.14-rc3, v6.14-rc2, v6.14-rc1 |
|
| #
2aee44f7 |
| 23-Jan-2025 |
Tomas Glozar <[email protected]> |
rtla: Count all processed events
Add a field processed_events to struct trace_instance and increment it in collect_registered_events, regardless of whether a handler is registered for the event.
Th
rtla: Count all processed events
Add a field processed_events to struct trace_instance and increment it in collect_registered_events, regardless of whether a handler is registered for the event.
The purpose is to calculate the percentage of events that were missed due to tracefs buffer overflow.
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 ...
|
| #
d6fcd28f |
| 23-Jan-2025 |
Tomas Glozar <[email protected]> |
rtla: Count missed trace events
Add function collect_missed_events to trace.c to act as a callback for tracefs_follow_missed_events, summing the number of total missed events into a new field missin
rtla: Count missed trace events
Add function collect_missed_events to trace.c to act as a callback for tracefs_follow_missed_events, summing the number of total missed events into a new field missing_events of struct trace_instance.
In case record->missed_events is negative, trace->missed_events is set to UINT64_MAX to signify an unknown number of events was missed.
The callback is activated on initialization of the trace instance.
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 ...
|
|
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 ...
|
| #
e879b5dc |
| 16-Jan-2025 |
Tomas Glozar <[email protected]> |
rtla: Add trace_instance_stop
Support not only turning trace on for the timerlat tracer, but also turning it off.
This will be used in subsequent patches to stop the timerlat tracer without also wi
rtla: Add trace_instance_stop
Support not only turning trace on for the timerlat tracer, but also turning it off.
This will be used in subsequent patches to stop the timerlat tracer without also wiping the trace buffer.
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] Signed-off-by: Tomas Glozar <[email protected]> Signed-off-by: Steven Rostedt (Google) <[email protected]>
show more ...
|
|
Revision tags: v6.13-rc7, v6.13-rc6, v6.13-rc5, v6.13-rc4, v6.13-rc3, v6.13-rc2, v6.13-rc1, v6.12, v6.12-rc7, v6.12-rc6, v6.12-rc5, v6.12-rc4, v6.12-rc3, v6.12-rc2, v6.12-rc1, 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 |
|
| #
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, v6.9-rc7, v6.9-rc6, 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, v6.8-rc3, 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, v6.4-rc5, v6.4-rc4, v6.4-rc3, v6.4-rc2, v6.4-rc1, v6.3, v6.3-rc7, v6.3-rc6, v6.3-rc5, v6.3-rc4, v6.3-rc3, v6.3-rc2, v6.3-rc1, v6.2, v6.2-rc8, v6.2-rc7, v6.2-rc6, v6.2-rc5, v6.2-rc4, v6.2-rc3, v6.2-rc2, v6.2-rc1, v6.1, v6.1-rc8, v6.1-rc7, v6.1-rc6, v6.1-rc5, v6.1-rc4, v6.1-rc3, v6.1-rc2, v6.1-rc1, v6.0, v6.0-rc7, v6.0-rc6, v6.0-rc5, v6.0-rc4, v6.0-rc3, v6.0-rc2, v6.0-rc1, v5.19 |
|
| #
4f753c3b |
| 25-Jul-2022 |
Andreas Schwab <[email protected]> |
rtla: Fix double free
Avoid double free by making trace_instance_destroy indempotent. When trace_instance_init fails, it calls trace_instance_destroy, but its only caller osnoise_destroy_tool calls
rtla: Fix double free
Avoid double free by making trace_instance_destroy indempotent. When trace_instance_init fails, it calls trace_instance_destroy, but its only caller osnoise_destroy_tool calls it again.
Link: https://lkml.kernel.org/r/[email protected]
Fixes: 0605bf009f18 ("rtla: Add osnoise tool") Signed-off-by: Andreas Schwab <[email protected]> Acked-by: Daniel Bristot de Oliveira <[email protected]> Signed-off-by: Steven Rostedt (Google) <[email protected]>
show more ...
|
|
Revision tags: v5.19-rc8, v5.19-rc7, v5.19-rc6, v5.19-rc5, v5.19-rc4, v5.19-rc3, v5.19-rc2, v5.19-rc1, v5.18, v5.18-rc7, v5.18-rc6, v5.18-rc5, v5.18-rc4, v5.18-rc3, v5.18-rc2, v5.18-rc1, v5.17, v5.17-rc8, v5.17-rc7 |
|
| #
28d2160c |
| 02-Mar-2022 |
Daniel Bristot de Oliveira <[email protected]> |
rtla: Check for trace off also in the trace instance
With the addition of --trigger option, it is also possible to stop the trace from the -t tracing instance using the traceoff trigger.
Make rtla
rtla: Check for trace off also in the trace instance
With the addition of --trigger option, it is also possible to stop the trace from the -t tracing instance using the traceoff trigger.
Make rtla tools to check if the trace is stopped also in the trace instance, stopping the execution of the tool.
Link: https://lkml.kernel.org/r/59fc7c6f23dddd5c8b7ef1782cf3da51ea2ce0f5.1646247211.git.bristot@kernel.org
Cc: Daniel Bristot de Oliveira <[email protected]> Cc: Clark Williams <[email protected]> Cc: Juri Lelli <[email protected]> Cc: Jonathan Corbet <[email protected]> Signed-off-by: Daniel Bristot de Oliveira <[email protected]> Signed-off-by: Steven Rostedt (Google) <[email protected]>
show more ...
|
| #
761916fd |
| 02-Mar-2022 |
Daniel Bristot de Oliveira <[email protected]> |
rtla/trace: Save event histogram output to a file
The hist: trigger generates a histogram in the file sys/event/hist. If the hist: trigger is used, automatically save the histogram output of the eve
rtla/trace: Save event histogram output to a file
The hist: trigger generates a histogram in the file sys/event/hist. If the hist: trigger is used, automatically save the histogram output of the event sys:event in the sys_event_hist.txt file.
Link: https://lkml.kernel.org/r/b5c906af31d4e022ffe87fb0848fac5c089087c8.1646247211.git.bristot@kernel.org
Cc: Daniel Bristot de Oliveira <[email protected]> Cc: Clark Williams <[email protected]> Cc: Juri Lelli <[email protected]> Cc: Jonathan Corbet <[email protected]> Signed-off-by: Daniel Bristot de Oliveira <[email protected]> Signed-off-by: Steven Rostedt (Google) <[email protected]>
show more ...
|
| #
5487b6ce |
| 02-Mar-2022 |
Daniel Bristot de Oliveira <[email protected]> |
rtla/trace: Add trace event filter helpers
Add a set of helper functions to allow rtla tools to filter events in the trace instance.
Link: https://lkml.kernel.org/r/12623b1684684549d53b90f4bf66fae4
rtla/trace: Add trace event filter helpers
Add a set of helper functions to allow rtla tools to filter events in the trace instance.
Link: https://lkml.kernel.org/r/12623b1684684549d53b90f4bf66fae44584fd14.1646247211.git.bristot@kernel.org
Cc: Daniel Bristot de Oliveira <[email protected]> Cc: Clark Williams <[email protected]> Cc: Juri Lelli <[email protected]> Cc: Jonathan Corbet <[email protected]> Signed-off-by: Daniel Bristot de Oliveira <[email protected]> Signed-off-by: Steven Rostedt (Google) <[email protected]>
show more ...
|
| #
336c92b2 |
| 02-Mar-2022 |
Daniel Bristot de Oliveira <[email protected]> |
rtla/trace: Add trace event trigger helpers
Add a set of helper functions to allow rtla tools to trigger event actions in the trace instance.
Link: https://lkml.kernel.org/r/e0d31abe879a78a5600b64f
rtla/trace: Add trace event trigger helpers
Add a set of helper functions to allow rtla tools to trigger event actions in the trace instance.
Link: https://lkml.kernel.org/r/e0d31abe879a78a5600b64f904d0dfa8f76e4fbb.1646247211.git.bristot@kernel.org
Cc: Daniel Bristot de Oliveira <[email protected]> Cc: Clark Williams <[email protected]> Cc: Juri Lelli <[email protected]> Cc: Jonathan Corbet <[email protected]> Signed-off-by: Daniel Bristot de Oliveira <[email protected]> Signed-off-by: Steven Rostedt (Google) <[email protected]>
show more ...
|
| #
b5aa0be2 |
| 02-Mar-2022 |
Daniel Bristot de Oliveira <[email protected]> |
rtla/trace: Add trace events helpers
Add a set of helper functions to allow the rtla tools to enable additional tracepoints in the trace instance.
Link: https://lkml.kernel.org/r/932398b36c1bbaa22c
rtla/trace: Add trace events helpers
Add a set of helper functions to allow the rtla tools to enable additional tracepoints in the trace instance.
Link: https://lkml.kernel.org/r/932398b36c1bbaa22c7810d7a40ca9b8c5595b94.1646247211.git.bristot@kernel.org
Cc: Daniel Bristot de Oliveira <[email protected]> Cc: Clark Williams <[email protected]> Cc: Juri Lelli <[email protected]> Cc: Jonathan Corbet <[email protected]> Signed-off-by: Daniel Bristot de Oliveira <[email protected]> Signed-off-by: Steven Rostedt (Google) <[email protected]>
show more ...
|
|
Revision tags: v5.17-rc6, v5.17-rc5, v5.17-rc4, v5.17-rc3 |
|
| #
1a622909 |
| 04-Feb-2022 |
Daniel Bristot de Oliveira <[email protected]> |
rtla/trace: Error message fixup
Use capital and change "tracer %s" to "%s tracer".
No functional change.
Link: https://lkml.kernel.org/r/361697d27431afefa64c67c323564205385c418d.1643990447.git.bri
rtla/trace: Error message fixup
Use capital and change "tracer %s" to "%s tracer".
No functional change.
Link: https://lkml.kernel.org/r/361697d27431afefa64c67c323564205385c418d.1643990447.git.bristot@kernel.org
Fixes: b1696371d865 ("rtla: Helper functions for rtla") Cc: Daniel Bristot de Oliveira <[email protected]> Cc: [email protected] Cc: [email protected] Signed-off-by: Daniel Bristot de Oliveira <[email protected]> Signed-off-by: Steven Rostedt (Google) <[email protected]>
show more ...
|
|
Revision tags: v5.17-rc2, v5.17-rc1, v5.16, v5.16-rc8, v5.16-rc7, v5.16-rc6, v5.16-rc5 |
|
| #
b1696371 |
| 10-Dec-2021 |
Daniel Bristot de Oliveira <[email protected]> |
rtla: Helper functions for rtla
This is a set of utils and tracer helper functions. They are used by rtla mostly to parse config, display data and some trace operations that are not part of libtrace
rtla: Helper functions for rtla
This is a set of utils and tracer helper functions. They are used by rtla mostly to parse config, display data and some trace operations that are not part of libtracefs (because they are only useful it for this case).
Link: https://lkml.kernel.org/r/a94c128aba9e6e66d502b7094f2e8c7ac95b12e5.1639158831.git.bristot@kernel.org
Cc: Tao Zhou <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Tom Zanussi <[email protected]> Cc: Masami Hiramatsu <[email protected]> Cc: Juri Lelli <[email protected]> Cc: Clark Williams <[email protected]> Cc: John Kacur <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Sebastian Andrzej Siewior <[email protected]> Cc: Daniel Bristot de Oliveira <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Signed-off-by: Daniel Bristot de Oliveira <[email protected]> Signed-off-by: Steven Rostedt <[email protected]>
show more ...
|