po 3. 3. 2025 v 21:04 odesÃlatel Steven Rostedt <rost...@goodmis.org> napsal: > > Not sure what you mean by "main instance"? >
By "main instance", I meant tool->trace.inst. My point was that record->trace.inst, which is a different instance, would be still on. But that's not the case, osnoise_stop_tracing() stops *all* osnoise instances, not just the first one - sorry, that was my mistake. > > The code being changed is: > > - 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); > } > So we need to stop tracing here, before we save the trace, if we want to do that. Perhaps combining this with the cleanup patch [1] and doing the stopping in save_trace_to_file would make sense? [1] - https://lore.kernel.org/linux-trace-kernel/20250219115138.406075-1-costa.s...@redhat.com/ Tomas