/kernel/linux/linux-5.10/tools/lib/perf/ |
D | cpumap.c | 51 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() 76 static struct perf_cpu_map *cpu_map__trim_new(int nr_cpus, int *tmp_cpus) in cpu_map__trim_new() argument 78 size_t payload_size = nr_cpus * sizeof(int); in cpu_map__trim_new() 84 qsort(cpus->map, nr_cpus, sizeof(int), cmp_int); in cpu_map__trim_new() 87 for (i = 0; i < nr_cpus; i++) { in cpu_map__trim_new() [all …]
|
/kernel/linux/linux-5.10/tools/testing/selftests/bpf/prog_tests/ |
D | map_init.c | 10 static int nr_cpus; variable 22 pcpu_map_value_t value[nr_cpus]; in map_populate() 26 for (i = 0; i < nr_cpus; i++) in map_populate() 105 for (i = 0; i < nr_cpus; i++) { in check_values_one_cpu() 131 pcpu_map_value_t value[nr_cpus]; in test_pcpu_map_init() 171 pcpu_map_value_t value[nr_cpus]; in test_pcpu_lru_map_init() 203 nr_cpus = bpf_num_possible_cpus(); in test_map_init() 204 if (nr_cpus <= 1) { in test_map_init()
|
D | perf_buffer.c | 48 int err, on_len, nr_on_cpus = 0, nr_cpus, i; in test_perf_buffer() local 56 nr_cpus = libbpf_num_possible_cpus(); in test_perf_buffer() 57 if (CHECK(nr_cpus < 0, "nr_cpus", "err %d\n", nr_cpus)) in test_perf_buffer() 91 for (i = 0; i < nr_cpus; i++) { in test_perf_buffer() 114 for (i = 0; i < nr_cpus; i++) { in test_perf_buffer()
|
D | xdp_noinline.c | 8 unsigned int nr_cpus = bpf_num_possible_cpus(); in test_xdp_noinline() local 19 } stats[nr_cpus]; in test_xdp_noinline() 59 for (i = 0; i < nr_cpus; i++) { in test_xdp_noinline()
|
D | l4lb_all.c | 7 unsigned int nr_cpus = bpf_num_possible_cpus(); in test_l4lb() local 17 } stats[nr_cpus]; in test_l4lb() 70 for (i = 0; i < nr_cpus; i++) { in test_l4lb()
|
/kernel/linux/linux-5.10/tools/testing/selftests/bpf/ |
D | test_lru_map.c | 27 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 …]
|
/kernel/linux/linux-5.10/samples/bpf/ |
D | test_lru_dist.c | 32 static int nr_cpus; variable 225 if (next_to_try == nr_cpus) in sched_next_online() 228 while (next_to_try < nr_cpus) { in sched_next_online() 321 nr_cpus * lru_size); in test_parallel_lru_dist() 337 unsigned long long key, value[nr_cpus]; in test_lru_loss0() 349 map_fd = create_map(map_type, map_flags, 900 * nr_cpus); in test_lru_loss0() 391 unsigned long long key, value[nr_cpus]; in test_lru_loss1() 401 map_fd = create_map(map_type, map_flags, 1000 * nr_cpus); in test_lru_loss1() 429 unsigned long long key, value[nr_cpus]; in do_test_parallel_lru_loss() 478 nr_cpus * (1000 + 200)); in test_parallel_lru_loss() [all …]
|
D | tracex3_user.c | 20 unsigned int nr_cpus = bpf_num_possible_cpus(); in clear_stats() local 21 __u64 values[nr_cpus]; in clear_stats() 77 unsigned int nr_cpus = bpf_num_possible_cpus(); in print_hist() local 79 long values[nr_cpus]; in print_hist() 89 for (i = 0; i < nr_cpus; i++) in print_hist()
|
D | xdp_monitor_user.c | 186 unsigned int nr_cpus = bpf_num_possible_cpus(); in map_collect_record() local 187 struct datarec values[nr_cpus]; in map_collect_record() 203 for (i = 0; i < nr_cpus; i++) { in map_collect_record() 223 unsigned int nr_cpus = bpf_num_possible_cpus(); in map_collect_record_u64() local 224 struct u64rec values[nr_cpus]; in map_collect_record_u64() 237 for (i = 0; i < nr_cpus; i++) { in map_collect_record_u64() 333 unsigned int nr_cpus = bpf_num_possible_cpus(); in stats_print() local 354 for (i = 0; i < nr_cpus; i++) { in stats_print() 379 for (i = 0; i < nr_cpus; i++) { in stats_print() 405 for (i = 0; i < nr_cpus; i++) { in stats_print() [all …]
|
D | sampleip_user.c | 27 static int nr_cpus; variable 49 for (i = 0; i < nr_cpus; i++) { in sampling_start() 72 for (i = 0; i < nr_cpus; i++) in sampling_end() 173 nr_cpus = sysconf(_SC_NPROCESSORS_ONLN); in main() 174 links = calloc(nr_cpus, sizeof(struct bpf_link *)); in main()
|
D | lwt_len_hist_user.c | 31 unsigned int nr_cpus = bpf_num_possible_cpus(); in main() local 33 uint64_t values[nr_cpus], sum, max_value = 0, data[MAX_INDEX] = {}; in main() 54 for (i = 0; i < nr_cpus; i++) in main()
|
D | xdp_rxq_info_user.c | 199 unsigned int nr_cpus = bpf_num_possible_cpus(); in alloc_record_per_cpu() local 202 array = calloc(nr_cpus, sizeof(struct datarec)); in alloc_record_per_cpu() 204 fprintf(stderr, "Mem alloc error (nr_cpus:%u)\n", nr_cpus); in alloc_record_per_cpu() 258 unsigned int nr_cpus = bpf_num_possible_cpus(); in map_collect_percpu() local 259 struct datarec values[nr_cpus]; in map_collect_percpu() 273 for (i = 0; i < nr_cpus; i++) { in map_collect_percpu() 339 unsigned int nr_cpus = bpf_num_possible_cpus(); in stats_print() local 362 for (i = 0; i < nr_cpus; i++) { in stats_print() 396 for (i = 0; i < nr_cpus; i++) { in stats_print()
|
D | xdp_redirect_map_user.c | 65 unsigned int nr_cpus = bpf_num_possible_cpus(); in poll_stats() local 66 __u64 values[nr_cpus], prev[nr_cpus]; in poll_stats() 77 for (i = 0; i < nr_cpus; i++) in poll_stats()
|
D | xdp_redirect_user.c | 65 unsigned int nr_cpus = bpf_num_possible_cpus(); in poll_stats() local 66 __u64 values[nr_cpus], prev[nr_cpus]; in poll_stats() 77 for (i = 0; i < nr_cpus; i++) in poll_stats()
|
D | tracex6_user.c | 77 int i, status, nr_cpus = sysconf(_SC_NPROCESSORS_CONF); in test_perf_event_array() local 78 pid_t pid[nr_cpus]; in test_perf_event_array() 83 for (i = 0; i < nr_cpus; i++) { in test_perf_event_array() 92 for (i = 0; i < nr_cpus; i++) { in test_perf_event_array()
|
D | xdp1_user.c | 46 unsigned int nr_cpus = bpf_num_possible_cpus(); in poll_stats() local 47 __u64 values[nr_cpus], prev[UINT8_MAX] = { 0 }; in poll_stats() 59 for (i = 0; i < nr_cpus; i++) in poll_stats()
|
/kernel/linux/linux-5.10/arch/mips/loongson64/ |
D | env.c | 120 loongson_sysconf.nr_cpus = ecpu->nr_cpus; in prom_init_env() 123 if (ecpu->nr_cpus > NR_CPUS || ecpu->nr_cpus == 0) in prom_init_env() 124 loongson_sysconf.nr_cpus = NR_CPUS; in prom_init_env() 125 loongson_sysconf.nr_nodes = (loongson_sysconf.nr_cpus + in prom_init_env()
|
/kernel/linux/linux-5.10/arch/arm64/kvm/vgic/ |
D | vgic-debug.c | 26 int nr_cpus; member 45 ++iter->vcpu_id < iter->nr_cpus) in iter_next() 58 int nr_cpus = atomic_read(&kvm->online_vcpus); in iter_init() local 62 iter->nr_cpus = nr_cpus; in iter_init() 78 iter->vcpu_id == iter->nr_cpus && in end_of_vgic() 246 if (iter->vcpu_id < iter->nr_cpus) in vgic_debug_show()
|
/kernel/linux/linux-5.10/tools/perf/util/ |
D | svghelper.c | 700 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 …]
|
/kernel/linux/linux-5.10/drivers/pci/controller/ |
D | pcie-iproc-msi.c | 98 int nr_cpus; member 197 return (hwirq % msi->nr_cpus); in hwirq_to_cpu() 253 if (msi->nr_cpus > 1 && nr_irqs > 1) in iproc_msi_irq_domain_alloc() 263 order_base_2(msi->nr_cpus * nr_irqs)); in iproc_msi_irq_domain_alloc() 291 order_base_2(msi->nr_cpus * nr_irqs)); in iproc_msi_irq_domain_free() 480 for (i = cpu; i < msi->nr_irqs; i += msi->nr_cpus) { in iproc_msi_irq_free() 492 for (i = cpu; i < msi->nr_irqs; i += msi->nr_cpus) { in iproc_msi_irq_setup() 544 msi->nr_cpus = num_possible_cpus(); in iproc_msi_init() 546 if (msi->nr_cpus == 1) in iproc_msi_init() 561 if (msi->nr_irqs < msi->nr_cpus) { in iproc_msi_init() [all …]
|
/kernel/linux/linux-5.10/tools/perf/arch/arm/util/ |
D | auxtrace.c | 21 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()
|
/kernel/linux/linux-5.10/drivers/hwmon/ |
D | amd_energy.c | 52 int nr_cpus; member 107 accumulate_delta(data, data->nr_cpus + sock, in read_accumulate() 111 if (data->core_id >= data->nr_cpus) in read_accumulate() 153 if (channel >= data->nr_cpus) { in amd_energy_read() 156 (channel - data->nr_cpus)); in amd_energy_read() 244 data->nr_cpus = cpus; in amd_create_sensor()
|
/kernel/linux/linux-5.10/tools/testing/selftests/vm/ |
D | userfaultfd.c | 63 static unsigned long nr_cpus, nr_pages, nr_pages_per_cpu, page_size; variable 713 pthread_t locking_threads[nr_cpus]; in stress() 714 pthread_t uffd_threads[nr_cpus]; in stress() 715 pthread_t background_threads[nr_cpus]; in stress() 718 for (cpu = 0; cpu < nr_cpus; cpu++) { in stress() 738 for (cpu = 0; cpu < nr_cpus; cpu++) in stress() 756 for (cpu = 0; cpu < nr_cpus; cpu++) in stress() 760 for (cpu = 0; cpu < nr_cpus; cpu++) { in stress() 1238 struct uffd_stats uffd_stats[nr_cpus]; in userfaultfd_stress() 1270 pipefd = malloc(sizeof(int) * nr_cpus * 2); in userfaultfd_stress() [all …]
|
/kernel/linux/linux-5.10/tools/virtio/virtio-trace/ |
D | trace-agent.c | 31 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()
|
/kernel/linux/linux-5.10/tools/testing/selftests/rcutorture/bin/ |
D | functions.sh | 63 if test "$3" -gt "$nr_cpus" 65 echo $nr_cpus
|