summaryrefslogtreecommitdiff
path: root/tools/tracing/rtla/src/osnoise_hist.c
diff options
context:
space:
mode:
authorDaniel Bristot de Oliveira <bristot@kernel.org>2023-06-06 19:12:21 +0300
committerSteven Rostedt (Google) <rostedt@goodmis.org>2023-06-13 23:37:05 +0300
commit57cf76ec64573ee1eb75b91d665dba18b21ece6e (patch)
tree8a5b52056bdfc73535d9dfe2b1bcd6473c4562ed /tools/tracing/rtla/src/osnoise_hist.c
parent2091336b9a8b5a2a59cdd5c468df62a4b562875f (diff)
downloadlinux-57cf76ec64573ee1eb75b91d665dba18b21ece6e.tar.xz
rtla: Start the tracers after creating all instances
Group all start tracing after finishing creating all instances. The tracing instance starts first for the case of hitting a stop tracing while enabling other instances. The trace instance is the one with most valuable information. Link: https://lkml.kernel.org/r/67da7a703a56f75d7cd46568525145a65501a7e8.1686066600.git.bristot@kernel.org Cc: William White <chwhite@redhat.com> Cc: Jonathan Corbet <corbet@lwn.net> Tested-by: Juri Lelli <juri.lelli@redhat.com> Signed-off-by: Daniel Bristot de Oliveira <bristot@kernel.org> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Diffstat (limited to 'tools/tracing/rtla/src/osnoise_hist.c')
-rw-r--r--tools/tracing/rtla/src/osnoise_hist.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/tools/tracing/rtla/src/osnoise_hist.c b/tools/tracing/rtla/src/osnoise_hist.c
index dfbcb5ca7ecb..8f81fa007364 100644
--- a/tools/tracing/rtla/src/osnoise_hist.c
+++ b/tools/tracing/rtla/src/osnoise_hist.c
@@ -870,8 +870,6 @@ int osnoise_hist_main(int argc, char *argv[])
}
}
- trace_instance_start(trace);
-
if (params->trace_output) {
record = osnoise_init_trace_tool("osnoise");
if (!record) {
@@ -885,9 +883,19 @@ int osnoise_hist_main(int argc, char *argv[])
goto out_hist;
}
- trace_instance_start(&record->trace);
}
+ /*
+ * Start the tracer here, after having set all instances.
+ *
+ * Let the trace instance start first for the case of hitting a stop
+ * tracing while enabling other instances. The trace instance is the
+ * one with most valuable information.
+ */
+ if (params->trace_output)
+ trace_instance_start(&record->trace);
+ trace_instance_start(trace);
+
tool->start_time = time(NULL);
osnoise_hist_set_signals(params);