On Fri, Feb 13, 2026 at 01:52:29PM +0200, Costa Shulyupin wrote: > sysconf(_SC_NPROCESSORS_CONF) (via get_nprocs_conf) reflects > cpu_possible_mask, which is fixed at boot time, so querying it > repeatedly is unnecessary. > > Replace multiple calls to sysconf(_SC_NPROCESSORS_CONF) with a single > global nr_cpus variable initialized once at startup.
Reviewed-by: Wander Lairson Costa <[email protected]> > > V3: > - Remove unneeded cpus parameter from timerlat BPF functions as > requested by Wander Costa. > v2: > - Add `#pragma once` in timerlat_u.h to avoid redefinition errors with > pre-C23 compilers. > > Costa Shulyupin (5): > tools/rtla: Consolidate nr_cpus usage across all tools > tools/rtla: Remove unneeded nr_cpus arguments > tools/rtla: Remove unneeded nr_cpus members > tools/rtla: Remove unneeded nr_cpus from for_each_monitored_cpu > tools/rtla: Remove unneeded cpus parameter from timerlat BPF functions > > tools/tracing/rtla/src/common.c | 7 ++- > tools/tracing/rtla/src/common.h | 4 +- > tools/tracing/rtla/src/osnoise_hist.c | 26 +++++------ > tools/tracing/rtla/src/osnoise_top.c | 16 ++----- > tools/tracing/rtla/src/timerlat.c | 9 ++-- > tools/tracing/rtla/src/timerlat_aa.c | 11 ++--- > tools/tracing/rtla/src/timerlat_bpf.c | 19 ++++---- > tools/tracing/rtla/src/timerlat_bpf.h | 12 ++--- > tools/tracing/rtla/src/timerlat_hist.c | 62 +++++++++++--------------- > tools/tracing/rtla/src/timerlat_top.c | 47 +++++++------------ > tools/tracing/rtla/src/timerlat_u.c | 9 ++-- > tools/tracing/rtla/src/timerlat_u.h | 1 + > tools/tracing/rtla/src/utils.c | 10 +---- > 13 files changed, 88 insertions(+), 145 deletions(-) > > -- > 2.52.0 >
