linux-trace-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1] rtla: Save trace when option `--trace` is specified
@ 2025-01-27 17:02 Costa Shulyupin
  2025-02-28  1:06 ` Steven Rostedt
  0 siblings, 1 reply; 11+ messages in thread
From: Costa Shulyupin @ 2025-01-27 17:02 UTC (permalink / raw)
  To: Steven Rostedt, Daniel Bristot de Oliveira, John Kacur,
	Costa Shulyupin, Tomas Glozar, Luis Claudio R. Goncalves,
	Eder Zulian, Dan Carpenter, linux-trace-kernel, linux-kernel

Rtla saves trace output only when option `--auto` or `--stop` is
specified. Single option `--trace` enables tracing, but doesn't save it.

Save trace output in any case.

Signed-off-by: Costa Shulyupin <costa.shul@redhat.com>
---
 tools/tracing/rtla/src/osnoise_hist.c | 9 ++++-----
 tools/tracing/rtla/src/osnoise_top.c  | 9 ++++-----
 2 files changed, 8 insertions(+), 10 deletions(-)

diff --git a/tools/tracing/rtla/src/osnoise_hist.c b/tools/tracing/rtla/src/osnoise_hist.c
index b4930b835b0a1..38fd10b2a3488 100644
--- a/tools/tracing/rtla/src/osnoise_hist.c
+++ b/tools/tracing/rtla/src/osnoise_hist.c
@@ -981,12 +981,11 @@ int osnoise_hist_main(int argc, char *argv[])
 
 	return_value = 0;
 
-	if (osnoise_trace_is_off(tool, record)) {
+	if (osnoise_trace_is_off(tool, record))
 		printf("rtla osnoise hit stop tracing\n");
-		if (params->trace_output) {
-			printf("  Saving trace to %s\n", params->trace_output);
-			save_trace_to_file(record->trace.inst, params->trace_output);
-		}
+	if (params->trace_output) {
+		printf("  Saving trace to %s\n", params->trace_output);
+		save_trace_to_file(record->trace.inst, params->trace_output);
 	}
 
 out_hist:
diff --git a/tools/tracing/rtla/src/osnoise_top.c b/tools/tracing/rtla/src/osnoise_top.c
index 4772677ac762c..0af639982b7c1 100644
--- a/tools/tracing/rtla/src/osnoise_top.c
+++ b/tools/tracing/rtla/src/osnoise_top.c
@@ -811,12 +811,11 @@ int osnoise_top_main(int argc, char **argv)
 
 	return_value = 0;
 
-	if (osnoise_trace_is_off(tool, record)) {
+	if (osnoise_trace_is_off(tool, record))
 		printf("osnoise hit stop tracing\n");
-		if (params->trace_output) {
-			printf("  Saving trace to %s\n", params->trace_output);
-			save_trace_to_file(record->trace.inst, params->trace_output);
-		}
+	if (params->trace_output) {
+		printf("  Saving trace to %s\n", params->trace_output);
+		save_trace_to_file(record->trace.inst, params->trace_output);
 	}
 
 out_top:
-- 
2.47.0


^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2025-05-01 18:13 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-27 17:02 [PATCH v1] rtla: Save trace when option `--trace` is specified Costa Shulyupin
2025-02-28  1:06 ` Steven Rostedt
2025-03-03 15:34   ` Tomas Glozar
2025-03-03 15:54     ` Costa Shulyupin
2025-03-04  8:03       ` Tomas Glozar
2025-03-03 20:03     ` Steven Rostedt
2025-03-04  8:00       ` Tomas Glozar
2025-03-04  8:16         ` Tomas Glozar
2025-03-04 17:10           ` Steven Rostedt
2025-05-01 14:42             ` Steven Rostedt
2025-05-01 18:12               ` Costa Shulyupin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).