Re: [PATCH v1] tools/rtla: Fix unassigned nr_cpus
From: Tomas Glozar
Date: Thu Oct 30 2025 - 05:10:52 EST
Hi Steven,
čt 2. 10. 2025 v 19:09 odesílatel Costa Shulyupin
<costa.shul@xxxxxxxxxx> napsal:
>
> In recently introduced timerlat_free(),
> the variable 'nr_cpus' is not assigned.
>
> Assign it with sysconf(_SC_NPROCESSORS_CONF) as done elsewhere.
> Remove the culprit: -Wno-maybe-uninitialized. The rest of the
> code is clean.
>
> Signed-off-by: Costa Shulyupin <costa.shul@xxxxxxxxxx>
> ---
> tools/tracing/rtla/Makefile.rtla | 2 +-
> tools/tracing/rtla/src/timerlat.c | 3 ++-
> 2 files changed, 3 insertions(+), 2 deletions(-)
>
This is another fix of a bug introduced in the 6.18-v1 RTLA code
consolidation [1], this time affecting the resetting of idle states
set through --deepest-idle-state. Could you please also add it to your
RTLA fix queue?
Also, this should have:
Fixes: 2f3172f9dd58 ("tools/rtla: Consolidate code between
osnoise/timerlat and hist/top")
[1] https://lore.kernel.org/linux-trace-kernel/20250907022325.243930-1-crwood@xxxxxxxxxx/T/
Thanks,
Tomas