diff --git a/tools/perf/bench/futex-hash.c b/tools/perf/bench/futex-hash.c index 0c69d20efa32..b472eded521b 100644 --- a/tools/perf/bench/futex-hash.c +++ b/tools/perf/bench/futex-hash.c @@ -174,7 +174,7 @@ int bench_futex_hash(int argc, const char **argv) pthread_attr_init(&thread_attr); gettimeofday(&bench__start, NULL); - nrcpus = perf_cpu_map__nr(cpu); + nrcpus = cpu__max_cpu().cpu; cpuset = CPU_ALLOC(nrcpus); BUG_ON(!cpuset); size = CPU_ALLOC_SIZE(nrcpus); diff --git a/tools/perf/bench/futex-lock-pi.c b/tools/perf/bench/futex-lock-pi.c index 7a4973346180..0416120c091b 100644 --- a/tools/perf/bench/futex-lock-pi.c +++ b/tools/perf/bench/futex-lock-pi.c @@ -122,7 +122,7 @@ static void create_threads(struct worker *w, struct perf_cpu_map *cpu) { cpu_set_t *cpuset; unsigned int i; - int nrcpus = perf_cpu_map__nr(cpu); + int nrcpus = cpu__max_cpu().cpu; size_t size; threads_starting = params.nthreads; diff --git a/tools/perf/bench/futex-requeue.c b/tools/perf/bench/futex-requeue.c index d9ad736c1a3e..aad5bfc4fe18 100644 --- a/tools/perf/bench/futex-requeue.c +++ b/tools/perf/bench/futex-requeue.c @@ -125,7 +125,7 @@ static void block_threads(pthread_t *w, struct perf_cpu_map *cpu) { cpu_set_t *cpuset; unsigned int i; - int nrcpus = perf_cpu_map__nr(cpu); + int nrcpus = cpu__max_cpu().cpu; size_t size; threads_starting = params.nthreads; diff --git a/tools/perf/bench/futex-wake-parallel.c b/tools/perf/bench/futex-wake-parallel.c index b66df553e561..90a5b91bf139 100644 --- a/tools/perf/bench/futex-wake-parallel.c +++ b/tools/perf/bench/futex-wake-parallel.c @@ -149,7 +149,7 @@ static void block_threads(pthread_t *w, struct perf_cpu_map *cpu) { cpu_set_t *cpuset; unsigned int i; - int nrcpus = perf_cpu_map__nr(cpu); + int nrcpus = cpu__max_cpu().cpu; size_t size; threads_starting = params.nthreads; diff --git a/tools/perf/bench/futex-wake.c b/tools/perf/bench/futex-wake.c index 690fd6d3da13..49b3c89b0b35 100644 --- a/tools/perf/bench/futex-wake.c +++ b/tools/perf/bench/futex-wake.c @@ -100,7 +100,7 @@ static void block_threads(pthread_t *w, struct perf_cpu_map *cpu) cpu_set_t *cpuset; unsigned int i; size_t size; - int nrcpus = perf_cpu_map__nr(cpu); + int nrcpus = cpu__max_cpu().cpu; threads_starting = params.nthreads; cpuset = CPU_ALLOC(nrcpus);