From 28d2160cb1a18cca87a51345e7df47499447f5a4 Mon Sep 17 00:00:00 2001 From: Daniel Bristot de Oliveira Date: Wed, 2 Mar 2022 20:01:37 +0100 Subject: 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 Cc: Clark Williams Cc: Juri Lelli Cc: Jonathan Corbet Signed-off-by: Daniel Bristot de Oliveira Signed-off-by: Steven Rostedt (Google) --- tools/tracing/rtla/src/osnoise_hist.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tools/tracing/rtla/src/osnoise_hist.c') diff --git a/tools/tracing/rtla/src/osnoise_hist.c b/tools/tracing/rtla/src/osnoise_hist.c index f86b5fb94efd..b73b919bd6b4 100644 --- a/tools/tracing/rtla/src/osnoise_hist.c +++ b/tools/tracing/rtla/src/osnoise_hist.c @@ -848,7 +848,7 @@ int osnoise_hist_main(int argc, char *argv[]) goto out_hist; } - if (!tracefs_trace_is_on(trace->inst)) + if (trace_is_off(&tool->trace, &record->trace)) break; }; @@ -858,7 +858,7 @@ int osnoise_hist_main(int argc, char *argv[]) return_value = 0; - if (!tracefs_trace_is_on(trace->inst)) { + if (trace_is_off(&tool->trace, &record->trace)) { printf("rtla timelat hit stop tracing\n"); if (params->trace_output) { printf(" Saving trace to %s\n", params->trace_output); -- cgit v1.2.3