Home
last modified time | relevance | path

Searched refs:nr_cpus (Results 1 – 24 of 24) sorted by relevance

/tools/perf/lib/
Dcpumap.c51 int nr_cpus; in cpu_map__default_new() local
53 nr_cpus = sysconf(_SC_NPROCESSORS_ONLN); in cpu_map__default_new()
54 if (nr_cpus < 0) in cpu_map__default_new()
57 cpus = malloc(sizeof(*cpus) + nr_cpus * sizeof(int)); in cpu_map__default_new()
61 for (i = 0; i < nr_cpus; ++i) in cpu_map__default_new()
64 cpus->nr = nr_cpus; in cpu_map__default_new()
71 static struct perf_cpu_map *cpu_map__trim_new(int nr_cpus, int *tmp_cpus) in cpu_map__trim_new() argument
73 size_t payload_size = nr_cpus * sizeof(int); in cpu_map__trim_new()
77 cpus->nr = nr_cpus; in cpu_map__trim_new()
88 int nr_cpus = 0; in perf_cpu_map__read() local
[all …]
Devlist.c248 int nr_cpus = perf_cpu_map__nr(evlist->cpus); in perf_evlist__alloc_pollfd() local
255 nfds += nr_cpus; in perf_evlist__alloc_pollfd()
257 nfds += nr_cpus * nr_threads; in perf_evlist__alloc_pollfd()
/tools/testing/selftests/bpf/prog_tests/
Dperf_buffer.c23 int err, prog_fd, on_len, nr_on_cpus = 0, nr_cpus, i, duration = 0; in test_perf_buffer() local
35 nr_cpus = libbpf_num_possible_cpus(); in test_perf_buffer()
36 if (CHECK(nr_cpus < 0, "nr_cpus", "err %d\n", nr_cpus)) in test_perf_buffer()
79 for (i = 0; i < nr_cpus; i++) { in test_perf_buffer()
Dxdp_noinline.c7 unsigned int nr_cpus = bpf_num_possible_cpus(); in test_xdp_noinline() local
17 } stats[nr_cpus]; in test_xdp_noinline()
70 for (i = 0; i < nr_cpus; i++) { in test_xdp_noinline()
Dl4lb_all.c6 unsigned int nr_cpus = bpf_num_possible_cpus(); in test_l4lb() local
16 } stats[nr_cpus]; in test_l4lb()
69 for (i = 0; i < nr_cpus; i++) { in test_l4lb()
/tools/testing/selftests/bpf/
Dtest_lru_map.c27 static int nr_cpus; variable
107 unsigned long long value0[nr_cpus], value1[nr_cpus]; in map_subset()
138 while (next < nr_cpus) { in sched_next_online()
161 unsigned long long key, value[nr_cpus]; in test_lru_sanity0()
171 lru_map_fd = create_map(map_type, map_flags, 2 * nr_cpus); in test_lru_sanity0()
250 unsigned long long key, end_key, value[nr_cpus]; in test_lru_sanity1()
326 unsigned long long key, value[nr_cpus]; in test_lru_sanity2()
434 unsigned long long key, end_key, value[nr_cpus]; in test_lru_sanity3()
499 unsigned long long key, value[nr_cpus]; in test_lru_sanity4()
510 3 * tgt_free * nr_cpus); in test_lru_sanity4()
[all …]
Dtest_maps.c149 unsigned int nr_cpus = bpf_num_possible_cpus(); in test_hashmap_percpu() local
162 for (i = 0; i < nr_cpus; i++) in test_hashmap_percpu()
224 for (i = 0; i < nr_cpus; i++) in test_hashmap_percpu()
402 unsigned int nr_cpus = bpf_num_possible_cpus(); in test_arraymap_percpu() local
413 for (i = 0; i < nr_cpus; i++) in test_arraymap_percpu()
432 bpf_percpu(values, nr_cpus - 1) == 0); in test_arraymap_percpu()
461 unsigned int nr_cpus = bpf_num_possible_cpus(); in test_arraymap_percpu_many_keys() local
477 for (i = 0; i < nr_cpus; i++) in test_arraymap_percpu_many_keys()
484 for (i = 0; i < nr_cpus; i++) in test_arraymap_percpu_many_keys()
489 for (i = 0; i < nr_cpus; i++) in test_arraymap_percpu_many_keys()
/tools/perf/arch/arm/util/
Dauxtrace.c21 int ret, i, nr_cpus = sysconf(_SC_NPROCESSORS_CONF); in find_all_arm_spe_pmus() local
25 arm_spe_pmus = zalloc(sizeof(struct perf_pmu *) * nr_cpus); in find_all_arm_spe_pmus()
32 for (i = 0; i < nr_cpus; i++) { in find_all_arm_spe_pmus()
/tools/testing/selftests/rcutorture/bin/
Dfunctions.sh63 if test "$3" -gt "$nr_cpus"
65 echo $nr_cpus
/tools/perf/util/
Dsvghelper.c700 int *pos, int nr_cpus) in scan_thread_topology() argument
709 for_each_set_bit(thr, cpumask_bits(&t->sib_thr[i]), nr_cpus) in scan_thread_topology()
715 static void scan_core_topology(int *map, struct topology *t, int nr_cpus) in scan_core_topology() argument
722 for_each_set_bit(cpu, cpumask_bits(&t->sib_core[i]), nr_cpus) in scan_core_topology()
723 scan_thread_topology(map, t, cpu, &pos, nr_cpus); in scan_core_topology()
726 static int str_to_bitmap(char *s, cpumask_t *b, int nr_cpus) in str_to_bitmap() argument
739 if (c >= nr_cpus) { in str_to_bitmap()
754 int i, nr_cpus; in svg_build_topology_map() local
758 nr_cpus = min(env->nr_cpus_online, MAX_NR_CPUS); in svg_build_topology_map()
774 if (str_to_bitmap(sib_core, &t.sib_core[i], nr_cpus)) { in svg_build_topology_map()
[all …]
Denv.c252 int cpu, nr_cpus; in perf_env__read_cpu_topology_map() local
260 nr_cpus = env->nr_cpus_avail; in perf_env__read_cpu_topology_map()
261 if (nr_cpus == -1) in perf_env__read_cpu_topology_map()
264 env->cpu = calloc(nr_cpus, sizeof(env->cpu[0])); in perf_env__read_cpu_topology_map()
268 for (cpu = 0; cpu < nr_cpus; ++cpu) { in perf_env__read_cpu_topology_map()
274 env->nr_cpus_avail = nr_cpus; in perf_env__read_cpu_topology_map()
Dmmap.c332 int c, cpu, nr_cpus; in build_node_mask() local
339 nr_cpus = perf_cpu_map__nr(cpu_map); in build_node_mask()
340 for (c = 0; c < nr_cpus; c++) { in build_node_mask()
Devsel.c1453 int nr_cpus, int nr_threads, in perf_evsel__remove_fd() argument
1456 for (int cpu = 0; cpu < nr_cpus; cpu++) in perf_evsel__remove_fd()
1462 int nr_cpus, int cpu_idx, in update_fds() argument
1467 if (cpu_idx >= nr_cpus || thread_idx >= nr_threads) in update_fds()
1471 nr_cpus = pos != evsel ? nr_cpus : cpu_idx; in update_fds()
1473 perf_evsel__remove_fd(pos, nr_cpus, nr_threads, thread_idx); in update_fds()
1486 int nr_cpus, int cpu, in ignore_missing_thread() argument
1511 if (update_fds(evsel, nr_cpus, cpu, threads->nr, thread)) in ignore_missing_thread()
Devlist.c377 int nr_cpus = perf_cpu_map__nr(evlist->core.cpus); in perf_evlist__enable_event_thread() local
382 for (cpu = 0; cpu < nr_cpus; cpu++) { in perf_evlist__enable_event_thread()
715 int nr_cpus = perf_cpu_map__nr(evlist->core.cpus); in evlist__mmap_per_cpu() local
719 for (cpu = 0; cpu < nr_cpus; cpu++) { in evlist__mmap_per_cpu()
Dmachine.c2591 int nr_cpus = min(machine->env->nr_cpus_avail, MAX_NR_CPUS); in machine__get_current_tid() local
2593 if (cpu < 0 || cpu >= nr_cpus || !machine->current_tid) in machine__get_current_tid()
2603 int nr_cpus = min(machine->env->nr_cpus_avail, MAX_NR_CPUS); in machine__set_current_tid() local
2611 machine->current_tid = calloc(nr_cpus, sizeof(pid_t)); in machine__set_current_tid()
2614 for (i = 0; i < nr_cpus; i++) in machine__set_current_tid()
2618 if (cpu >= nr_cpus) { in machine__set_current_tid()
Dsession.c2327 int nr_cpus = min(session->header.env.nr_cpus_avail, MAX_NR_CPUS); in perf_session__cpu_bitmap() local
2352 if (cpu >= nr_cpus) { in perf_session__cpu_bitmap()
/tools/virtio/virtio-trace/
Dtrace-agent.c31 int nr_cpus = (int)sysconf(_SC_NPROCESSORS_CONF); in get_total_cpus() local
33 if (nr_cpus <= 0) { in get_total_cpus()
36 } else if (nr_cpus > MAX_CPUS) { in get_total_cpus()
41 return nr_cpus; in get_total_cpus()
/tools/testing/selftests/rcutorture/configs/rcu/
DTREE01.boot1 maxcpus=8 nr_cpus=43
/tools/testing/selftests/vm/
Duserfaultfd.c63 static unsigned long nr_cpus, nr_pages, nr_pages_per_cpu, page_size; variable
589 pthread_t locking_threads[nr_cpus]; in stress()
590 pthread_t uffd_threads[nr_cpus]; in stress()
591 pthread_t background_threads[nr_cpus]; in stress()
595 for (cpu = 0; cpu < nr_cpus; cpu++) { in stress()
614 for (cpu = 0; cpu < nr_cpus; cpu++) in stress()
632 for (cpu = 0; cpu < nr_cpus; cpu++) in stress()
636 for (cpu = 0; cpu < nr_cpus; cpu++) { in stress()
1044 unsigned long userfaults[nr_cpus]; in userfaultfd_stress()
1076 pipefd = malloc(sizeof(int) * nr_cpus * 2); in userfaultfd_stress()
[all …]
Drun_vmtests26 nr_cpus=$(nproc)
28 half_ufd_size_MB=$((((nr_cpus * hpgsize_MB + 127) / 128) * 128))
/tools/perf/bench/
Dnuma.c125 int nr_cpus; member
276 for (cpu = 0; cpu < g->p.nr_cpus; cpu++) in bind_to_cpu()
279 BUG_ON(target_cpu < 0 || target_cpu >= g->p.nr_cpus); in bind_to_cpu()
291 int cpus_per_node = g->p.nr_cpus / nr_numa_nodes(); in bind_to_node()
296 BUG_ON(cpus_per_node * nr_numa_nodes() != g->p.nr_cpus); in bind_to_node()
305 for (cpu = 0; cpu < g->p.nr_cpus; cpu++) in bind_to_node()
311 BUG_ON(cpu_stop > g->p.nr_cpus); in bind_to_node()
537 BUG_ON(step <= 0 || step >= g->p.nr_cpus); in parse_setup_cpu_list()
549 BUG_ON(bind_len <= 0 || bind_len > g->p.nr_cpus); in parse_setup_cpu_list()
562 if (bind_cpu_0 >= g->p.nr_cpus || bind_cpu_1 >= g->p.nr_cpus) { in parse_setup_cpu_list()
[all …]
/tools/power/cpupower/utils/
Dcpufreq-info.c58 unsigned int cpu, nr_cpus; in proc_cpufreq_output() local
66 nr_cpus = count_cpus(); in proc_cpufreq_output()
67 for (cpu = 0; cpu < nr_cpus; cpu++) { in proc_cpufreq_output()
/tools/lib/bpf/
Dlibbpf.c2147 int nr_cpus = 0; in bpf_object__create_maps() local
2172 if (!nr_cpus) in bpf_object__create_maps()
2173 nr_cpus = libbpf_num_possible_cpus(); in bpf_object__create_maps()
2174 if (nr_cpus < 0) { in bpf_object__create_maps()
2176 nr_cpus); in bpf_object__create_maps()
2177 err = nr_cpus; in bpf_object__create_maps()
2181 map->name, nr_cpus); in bpf_object__create_maps()
2182 create_attr.max_entries = nr_cpus; in bpf_object__create_maps()
/tools/perf/Documentation/
Dperf.data-file-format.txt112 struct nr_cpus {