/tools/perf/tests/ |
D | openat-syscall-all-cpus.c | 30 cpu_set_t cpu_set; in test__openat_syscall_event_on_all_cpus() local 46 CPU_ZERO(&cpu_set); in test__openat_syscall_event_on_all_cpus() 77 CPU_SET(cpu.cpu, &cpu_set); in test__openat_syscall_event_on_all_cpus() 78 if (sched_setaffinity(0, sizeof(cpu_set), &cpu_set) < 0) { in test__openat_syscall_event_on_all_cpus() 88 CPU_CLR(cpu.cpu, &cpu_set); in test__openat_syscall_event_on_all_cpus()
|
D | mmap-basic.c | 39 cpu_set_t cpu_set; in test__basic_mmap() local 61 CPU_ZERO(&cpu_set); in test__basic_mmap() 62 CPU_SET(perf_cpu_map__cpu(cpus, 0).cpu, &cpu_set); in test__basic_mmap() 63 sched_setaffinity(0, sizeof(cpu_set), &cpu_set); in test__basic_mmap() 64 if (sched_setaffinity(0, sizeof(cpu_set), &cpu_set) < 0) { in test__basic_mmap()
|
/tools/testing/selftests/bpf/prog_tests/ |
D | perf_link.c | 12 cpu_set_t cpu_set; in burn_cpu() local 16 CPU_ZERO(&cpu_set); in burn_cpu() 17 CPU_SET(0, &cpu_set); in burn_cpu() 18 err = pthread_setaffinity_np(pthread_self(), sizeof(cpu_set), &cpu_set); in burn_cpu()
|
D | perf_event_stackmap.c | 72 cpu_set_t cpu_set; in test_perf_event_stackmap() local 84 CPU_ZERO(&cpu_set); in test_perf_event_stackmap() 85 CPU_SET(0, &cpu_set); in test_perf_event_stackmap() 86 err = pthread_setaffinity_np(pthread_self(), sizeof(cpu_set), &cpu_set); in test_perf_event_stackmap()
|
D | perf_branches.c | 68 cpu_set_t cpu_set; in test_perf_branches_common() local 81 CPU_ZERO(&cpu_set); in test_perf_branches_common() 82 CPU_SET(0, &cpu_set); in test_perf_branches_common() 83 err = pthread_setaffinity_np(pthread_self(), sizeof(cpu_set), &cpu_set); in test_perf_branches_common()
|
D | perf_buffer.c | 31 cpu_set_t cpu_set; in trigger_on_cpu() local 34 CPU_ZERO(&cpu_set); in trigger_on_cpu() 35 CPU_SET(cpu, &cpu_set); in trigger_on_cpu() 37 err = pthread_setaffinity_np(pthread_self(), sizeof(cpu_set), &cpu_set); in trigger_on_cpu()
|
D | get_stack_raw_tp.c | 97 cpu_set_t cpu_set; in test_get_stack_raw_tp() local 119 CPU_ZERO(&cpu_set); in test_get_stack_raw_tp() 120 CPU_SET(0, &cpu_set); in test_get_stack_raw_tp() 121 err = pthread_setaffinity_np(pthread_self(), sizeof(cpu_set), &cpu_set); in test_get_stack_raw_tp()
|
D | bpf_cookie.c | 427 cpu_set_t cpu_set; in burn_cpu() local 431 CPU_ZERO(&cpu_set); in burn_cpu() 432 CPU_SET(0, &cpu_set); in burn_cpu() 433 err = pthread_setaffinity_np(pthread_self(), sizeof(cpu_set), &cpu_set); in burn_cpu()
|
/tools/testing/selftests/kvm/ |
D | hardware_disable_test.c | 71 static inline void check_set_affinity(pthread_t thread, cpu_set_t *cpu_set) in check_set_affinity() argument 75 r = pthread_setaffinity_np(thread, sizeof(cpu_set_t), cpu_set); in check_set_affinity() 91 cpu_set_t cpu_set; in run_test() local 97 CPU_ZERO(&cpu_set); in run_test() 99 CPU_SET(i, &cpu_set); in run_test() 108 check_set_affinity(threads[i], &cpu_set); in run_test() 113 check_set_affinity(throw_away, &cpu_set); in run_test()
|
/tools/testing/selftests/net/ |
D | so_incoming_cpu.c | 181 cpu_set_t cpu_set; in create_clients() local 185 CPU_ZERO(&cpu_set); in create_clients() 187 CPU_SET(i, &cpu_set); in create_clients() 188 ASSERT_EQ(CPU_COUNT(&cpu_set), 1); in create_clients() 189 ASSERT_NE(CPU_ISSET(i, &cpu_set), 0); in create_clients() 194 ret = sched_setaffinity(0, sizeof(cpu_set), &cpu_set); in create_clients()
|
D | reuseport_bpf_cpu.c | 99 cpu_set_t cpu_set; in send_from_cpu() local 129 memset(&cpu_set, 0, sizeof(cpu_set)); in send_from_cpu() 130 CPU_SET(cpu_id, &cpu_set); in send_from_cpu() 131 if (sched_setaffinity(0, sizeof(cpu_set), &cpu_set) < 0) in send_from_cpu()
|
/tools/testing/selftests/bpf/ |
D | bench.h | 14 struct cpu_set { struct 31 struct cpu_set prod_cpus; argument 32 struct cpu_set cons_cpus;
|
D | bench.c | 458 static int next_cpu(struct cpu_set *cpu_set) in next_cpu() argument 460 if (cpu_set->cpus) { in next_cpu() 464 for (i = cpu_set->next_cpu; i < cpu_set->cpus_len; i++) { in next_cpu() 465 if (cpu_set->cpus[i]) { in next_cpu() 466 cpu_set->next_cpu = i + 1; in next_cpu() 474 return cpu_set->next_cpu++ % env.nr_cpus; in next_cpu()
|
/tools/testing/selftests/mqueue/ |
D | mq_perf_tests.c | 83 cpu_set_t *cpu_set; variable 184 CPU_FREE(cpu_set); in shutdown() 564 cpu_set = CPU_ALLOC(cpus_online); in main() 565 if (cpu_set == NULL) { in main() 570 CPU_ZERO_S(cpu_set_size, cpu_set); in main() 598 cpu_set)) { in main() 604 cpu_set_size, cpu_set); in main() 728 CPU_ZERO_S(cpu_set_size, cpu_set); in main() 729 CPU_SET_S(cpus_to_pin[i], cpu_set_size, cpu_set); in main() 732 cpu_set); in main() [all …]
|
/tools/perf/arch/x86/tests/ |
D | intel-pt-test.c | 324 cpu_set_t cpu_set; in setaffinity() local 326 CPU_ZERO(&cpu_set); in setaffinity() 327 CPU_SET(cpu, &cpu_set); in setaffinity() 328 if (sched_setaffinity(0, sizeof(cpu_set), &cpu_set)) { in setaffinity()
|
/tools/virtio/ |
D | vringh_test.c | 145 cpu_set_t cpu_set; in parallel_test() local 167 CPU_ZERO(&cpu_set); in parallel_test() 191 CPU_SET(first_cpu, &cpu_set); in parallel_test() 192 if (sched_setaffinity(getpid(), sizeof(cpu_set), &cpu_set)) in parallel_test() 315 CPU_SET(first_cpu, &cpu_set); in parallel_test() 316 if (sched_setaffinity(getpid(), sizeof(cpu_set), &cpu_set)) in parallel_test()
|
/tools/power/x86/intel-speed-select/ |
D | isst.h | 226 extern size_t alloc_cpu_set(cpu_set_t **cpu_set); 227 extern void free_cpu_set(cpu_set_t *cpu_set);
|
D | isst-config.c | 668 size_t alloc_cpu_set(cpu_set_t **cpu_set) in alloc_cpu_set() argument 679 *cpu_set = _cpu_set; in alloc_cpu_set() 683 void free_cpu_set(cpu_set_t *cpu_set) in free_cpu_set() argument 685 CPU_FREE(cpu_set); in free_cpu_set()
|
/tools/power/x86/x86_energy_perf_policy/ |
D | x86_energy_perf_policy.c | 1307 void for_all_cpus_in_set(size_t set_size, cpu_set_t *cpu_set, int (func)(int)) in for_all_cpus_in_set() argument 1312 if (CPU_ISSET_S(cpu_num, set_size, cpu_set)) in for_all_cpus_in_set()
|