Thread (11 messages) 11 messages, 3 authors, 2025-05-01

Re: [PATCH v1] rtla: Save trace when option `--trace` is specified

From: Steven Rostedt <rostedt@goodmis.org>
Date: 2025-02-28 01:05:48
Also in: lkml

On Mon, 27 Jan 2025 19:02:40 +0200
Costa Shulyupin [off-list ref] wrote:
quoted hunk ↗ jump to hunk
+++ 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);
 	}
Without tracing being off, this can run forever if the events come in
faster than it can be recorded. And save trace uses the "trace" file, which
is slow to read.

Are you sure you want that?

-- Steve
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help