diff options
| author | Wander Lairson Costa <wander@redhat.com> | 2026-03-09 16:46:17 -0300 |
|---|---|---|
| committer | Tomas Glozar <tglozar@redhat.com> | 2026-03-10 10:32:37 +0100 |
| commit | a50c53884db83189947f213d4c7f8385c522d141 (patch) | |
| tree | b7e09a96f50e31b223e006c313d96509d5fc8118 /tools/perf/scripts/python | |
| parent | 989e5b8f0c5302cfb233fa2db49f8877b5f1352d (diff) | |
rtla: Introduce common_threshold_handler() helper
Several functions duplicate the logic for handling threshold actions.
When a threshold is reached, these functions stop the trace, perform
configured actions, and restart the trace if --on-threshold continue
is set.
Create common_threshold_handler() to centralize this shared logic and
avoid code duplication. The function executes the configured threshold
actions and restarts the necessary trace instances when appropriate.
Also add should_continue_tracing() helper to encapsulate the check
for whether tracing should continue after a threshold event, improving
code readability at call sites.
In timerlat_top_bpf_main_loop(), use common_params directly instead
of casting through timerlat_params when only common fields are needed.
Signed-off-by: Wander Lairson Costa <wander@redhat.com>
Link: https://lore.kernel.org/r/20260309195040.1019085-5-wander@redhat.com
Signed-off-by: Tomas Glozar <tglozar@redhat.com>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
