diff options
| author | Costa Shulyupin <costa.shul@redhat.com> | 2025-10-02 20:08:45 +0300 |
|---|---|---|
| committer | Tomas Glozar <tglozar@redhat.com> | 2025-11-20 13:15:54 +0100 |
| commit | b4275b23010df719ec6508ddbc84951dcd24adce (patch) | |
| tree | 469a6a15bd7b37cafd6decb9f3d0c027d08020fe /tools/tracing/rtla/src | |
| parent | 671314fce1c60913012e5643ffecdaa4578cfcb3 (diff) | |
tools/rtla: Fix unassigned nr_cpus
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@redhat.com>
Reviewed-by: Tomas Glozar <tglozar@redhat.com>
Fixes: 2f3172f9dd58 ("tools/rtla: Consolidate code between osnoise/timerlat and hist/top")
Link: https://lore.kernel.org/r/20251002170846.437888-1-costa.shul@redhat.com
Signed-off-by: Tomas Glozar <tglozar@redhat.com>
Diffstat (limited to 'tools/tracing/rtla/src')
| -rw-r--r-- | tools/tracing/rtla/src/timerlat.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/tracing/rtla/src/timerlat.c b/tools/tracing/rtla/src/timerlat.c index 28ea4f6710c1..df4f9bfe3433 100644 --- a/tools/tracing/rtla/src/timerlat.c +++ b/tools/tracing/rtla/src/timerlat.c @@ -213,7 +213,8 @@ void timerlat_analyze(struct osnoise_tool *tool, bool stopped) void timerlat_free(struct osnoise_tool *tool) { struct timerlat_params *params = to_timerlat_params(tool->params); - int nr_cpus, i; + int nr_cpus = sysconf(_SC_NPROCESSORS_CONF); + int i; timerlat_aa_destroy(); if (dma_latency_fd >= 0) |
