}
}
- trace_instance_start(trace);
-
if (params->trace_output) {
record = osnoise_init_trace_tool("osnoise");
if (!record) {
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);
}
}
- trace_instance_start(trace);
-
if (params->trace_output) {
record = osnoise_init_trace_tool("osnoise");
if (!record) {
if (retval)
goto out_top;
}
+ }
+ /*
+ * 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_top_set_signals(params);
}
}
- trace_instance_start(trace);
-
if (params->trace_output) {
record = osnoise_init_trace_tool("timerlat");
if (!record) {
if (retval)
goto out_hist;
}
-
- trace_instance_start(&record->trace);
}
if (!params->no_aa) {
err_msg("Failed to enable timerlat tracer\n");
goto out_hist;
}
+ }
+ /*
+ * Start the tracers 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);
+ if (!params->no_aa)
trace_instance_start(&aa->trace);
- }
+ trace_instance_start(trace);
tool->start_time = time(NULL);
timerlat_hist_set_signals(params);
}
}
- trace_instance_start(trace);
-
if (params->trace_output) {
record = osnoise_init_trace_tool("timerlat");
if (!record) {
if (retval)
goto out_top;
}
-
- trace_instance_start(&record->trace);
}
if (!params->no_aa) {
err_msg("Failed to enable timerlat tracer\n");
goto out_top;
}
-
- trace_instance_start(&aa->trace);
}
}
+ /*
+ * Start the tracers 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);
+ if (!params->no_aa && aa != top)
+ trace_instance_start(&aa->trace);
+ trace_instance_start(trace);
+
top->start_time = time(NULL);
timerlat_top_set_signals(params);