Re: [PATCH v3 5/5] tools/rtla: Remove unneeded cpus parameter from timerlat BPF functions

From: Tomas Glozar

Date: Wed Mar 04 2026 - 10:27:18 EST


pá 13. 2. 2026 v 12:53 odesílatel Costa Shulyupin
<costa.shul@xxxxxxxxxx> napsal:
>
> nr_cpus is a global variable available throughout the codebase, so
> passing it as a function parameter is unnecessary.
>
> Remove the cpus parameter from timerlat_bpf_get_hist_value() and
> get_value(), using the global nr_cpus directly.
>
> Signed-off-by: Costa Shulyupin <costa.shul@xxxxxxxxxx>
> ---
> tools/tracing/rtla/src/timerlat_bpf.c | 16 +++++++---------
> tools/tracing/rtla/src/timerlat_bpf.h | 6 ++----
> tools/tracing/rtla/src/timerlat_hist.c | 2 +-
> 3 files changed, 10 insertions(+), 14 deletions(-)
>

Is there a reason to have a separate commit for this? The change fits
into the "tools/rtla: Remove unneeded nr_cpus arguments", which also
touches some of the functions in timerlat_bpf.c. It feels strange to
have some timerlat BPF functions cleaned up in that commit and some in
this one.

Tomas