Re: [PATCH v1] rtla: Save trace when option `--trace` is specified
From: Tomas Glozar
Date: Tue Mar 04 2025 - 03:16:46 EST
út 4. 3. 2025 v 9:00 odesílatel Tomas Glozar <tglozar@xxxxxxxxxx> napsal:
>
> 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?
>
Also, the patch will also save the trace if running with -a and the
threshold was not violated, which is not what one usually wants, e.g.:
$ rtla osnoise top -c 0 -q -a 10000000 -d 5s
Operating System Noise
duration: 0 00:00:05 | time is in us
CPU Period Runtime Noise % CPU Aval Max Noise Max
Single HW NMI IRQ Softirq Threa
d
0 #4 4000000 37712 99.05720 10998
555 7624 0 4011 34 2
4
Saving trace to osnoise_trace.txt
I believe it would be better to add a new option, something like
--force-trace, that would be used to save the trace even if there is
no threshold violation. -t/--trace and -a could then be used with the
same semantics as before.
Tomas