public inbox for linux-trace-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/5] tools/rtla: Consolidate nr_cpus usage
@ 2026-02-13 11:52 Costa Shulyupin
  2026-02-13 11:52 ` [PATCH v3 1/5] tools/rtla: Consolidate nr_cpus usage across all tools Costa Shulyupin
                   ` (5 more replies)
  0 siblings, 6 replies; 11+ messages in thread
From: Costa Shulyupin @ 2026-02-13 11:52 UTC (permalink / raw)
  To: Steven Rostedt, Tomas Glozar, Costa Shulyupin, Crystal Wood,
	Wander Lairson Costa, Ivan Pravdin, John Kacur, Tiezhu Yang,
	linux-trace-kernel, linux-kernel, bpf

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.

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


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2026-03-04 15:52 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-13 11:52 [PATCH v3 0/5] tools/rtla: Consolidate nr_cpus usage Costa Shulyupin
2026-02-13 11:52 ` [PATCH v3 1/5] tools/rtla: Consolidate nr_cpus usage across all tools Costa Shulyupin
2026-03-04 14:59   ` Tomas Glozar
2026-03-04 15:40     ` Costa Shulyupin
2026-03-04 15:51       ` Tomas Glozar
2026-02-13 11:52 ` [PATCH v3 2/5] tools/rtla: Remove unneeded nr_cpus arguments Costa Shulyupin
2026-02-13 11:52 ` [PATCH v3 3/5] tools/rtla: Remove unneeded nr_cpus members Costa Shulyupin
2026-02-13 11:52 ` [PATCH v3 4/5] tools/rtla: Remove unneeded nr_cpus from for_each_monitored_cpu Costa Shulyupin
2026-02-13 11:52 ` [PATCH v3 5/5] tools/rtla: Remove unneeded cpus parameter from timerlat BPF functions Costa Shulyupin
2026-03-04 14:56   ` Tomas Glozar
2026-02-13 13:54 ` [PATCH v3 0/5] tools/rtla: Consolidate nr_cpus usage Wander Lairson Costa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox