[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAP4=nvQ9pXYtihL7HTTRK=EzUEubtWbxDr78JswksSo-wa7zYw@mail.gmail.com>
Date: Tue, 4 Mar 2025 09:00:40 +0100
From: Tomas Glozar <tglozar@...hat.com>
To: Steven Rostedt <rostedt@...dmis.org>
Cc: Costa Shulyupin <costa.shul@...hat.com>, John Kacur <jkacur@...hat.com>,
"Luis Claudio R. Goncalves" <lgoncalv@...hat.com>, Eder Zulian <ezulian@...hat.com>,
Dan Carpenter <dan.carpenter@...aro.org>, linux-trace-kernel@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v1] rtla: Save trace when option `--trace` is specified
po 3. 3. 2025 v 21:04 odesÃlatel Steven Rostedt <rostedt@...dmis.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.shul@redhat.com/
Tomas
Powered by blists - more mailing lists