/tools/perf/tests/ |
D | open-syscall-all-cpus.c | 10 struct cpu_map *cpus; in test__open_syscall_event_on_all_cpus() local 22 cpus = cpu_map__new(NULL); in test__open_syscall_event_on_all_cpus() 23 if (cpus == NULL) { in test__open_syscall_event_on_all_cpus() 36 if (perf_evsel__open(evsel, cpus, threads) < 0) { in test__open_syscall_event_on_all_cpus() 43 for (cpu = 0; cpu < cpus->nr; ++cpu) { in test__open_syscall_event_on_all_cpus() 51 if (cpus->map[cpu] >= CPU_SETSIZE) { in test__open_syscall_event_on_all_cpus() 52 pr_debug("Ignoring CPU %d\n", cpus->map[cpu]); in test__open_syscall_event_on_all_cpus() 56 CPU_SET(cpus->map[cpu], &cpu_set); in test__open_syscall_event_on_all_cpus() 59 cpus->map[cpu], in test__open_syscall_event_on_all_cpus() 67 CPU_CLR(cpus->map[cpu], &cpu_set); in test__open_syscall_event_on_all_cpus() [all …]
|
D | mmap-basic.c | 23 struct cpu_map *cpus; in test__basic_mmap() local 42 cpus = cpu_map__new(NULL); in test__basic_mmap() 43 if (cpus == NULL) { in test__basic_mmap() 49 CPU_SET(cpus->map[0], &cpu_set); in test__basic_mmap() 53 cpus->map[0], strerror_r(errno, sbuf, sizeof(sbuf))); in test__basic_mmap() 63 perf_evlist__set_maps(evlist, cpus, threads); in test__basic_mmap() 80 if (perf_evsel__open(evsels[i], cpus, threads) < 0) { in test__basic_mmap() 142 cpus = NULL; in test__basic_mmap() 145 cpu_map__delete(cpus); in test__basic_mmap()
|
D | keep-tracking.c | 64 struct cpu_map *cpus = NULL; in test__keep_tracking() local 73 cpus = cpu_map__new(NULL); in test__keep_tracking() 74 CHECK_NOT_NULL__(cpus); in test__keep_tracking() 79 perf_evlist__set_maps(evlist, cpus, threads); in test__keep_tracking() 147 cpu_map__delete(cpus); in test__keep_tracking()
|
D | perf-time-to-tsc.c | 49 struct cpu_map *cpus = NULL; in test__perf_time_to_tsc() local 63 cpus = cpu_map__new(NULL); in test__perf_time_to_tsc() 64 CHECK_NOT_NULL__(cpus); in test__perf_time_to_tsc() 69 perf_evlist__set_maps(evlist, cpus, threads); in test__perf_time_to_tsc()
|
D | task-exit.c | 61 evlist->cpus = cpu_map__dummy_new(); in test__task_exit() 63 if (!evlist->cpus || !evlist->threads) { in test__task_exit()
|
D | sw-clock.c | 53 evlist->cpus = cpu_map__dummy_new(); in __test__sw_clock_freq() 55 if (!evlist->cpus || !evlist->threads) { in __test__sw_clock_freq()
|
D | code-reading.c | 406 struct cpu_map *cpus = NULL; in do_test_code_reading() local 466 cpus = cpu_map__new(NULL); in do_test_code_reading() 467 if (!cpus) { in do_test_code_reading() 481 perf_evlist__set_maps(evlist, cpus, threads); in do_test_code_reading() 545 cpu_map__delete(cpus); in do_test_code_reading()
|
D | switch-tracking.c | 322 struct cpu_map *cpus = NULL; in test__switch_tracking() local 335 cpus = cpu_map__new(NULL); in test__switch_tracking() 336 if (!cpus) { in test__switch_tracking() 347 perf_evlist__set_maps(evlist, cpus, threads); in test__switch_tracking() 563 cpu_map__delete(cpus); in test__switch_tracking()
|
/tools/perf/util/ |
D | cpumap.c | 11 struct cpu_map *cpus; in cpu_map__default_new() local 18 cpus = malloc(sizeof(*cpus) + nr_cpus * sizeof(int)); in cpu_map__default_new() 19 if (cpus != NULL) { in cpu_map__default_new() 22 cpus->map[i] = i; in cpu_map__default_new() 24 cpus->nr = nr_cpus; in cpu_map__default_new() 27 return cpus; in cpu_map__default_new() 33 struct cpu_map *cpus = malloc(sizeof(*cpus) + payload_size); in cpu_map__trim_new() local 35 if (cpus != NULL) { in cpu_map__trim_new() 36 cpus->nr = nr_cpus; in cpu_map__trim_new() 37 memcpy(cpus->map, tmp_cpus, payload_size); in cpu_map__trim_new() [all …]
|
D | record.c | 60 struct cpu_map *cpus; in perf_probe_api() local 63 cpus = cpu_map__new(NULL); in perf_probe_api() 64 if (!cpus) in perf_probe_api() 66 cpu = cpus->map[0]; in perf_probe_api() 67 cpu_map__delete(cpus); in perf_probe_api() 111 if (evlist->cpus->map[0] < 0) in perf_evlist__config() 225 if (!evlist || cpu_map__empty(evlist->cpus)) { in perf_evlist__can_select_event() 226 struct cpu_map *cpus = cpu_map__new(NULL); in perf_evlist__can_select_event() local 228 cpu = cpus ? cpus->map[0] : 0; in perf_evlist__can_select_event() 229 cpu_map__delete(cpus); in perf_evlist__can_select_event() [all …]
|
D | evlist.c | 34 void perf_evlist__init(struct perf_evlist *evlist, struct cpu_map *cpus, in perf_evlist__init() argument 42 perf_evlist__set_maps(evlist, cpus, threads); in perf_evlist__init() 116 cpu_map__delete(evlist->cpus); in perf_evlist__delete() 118 evlist->cpus = NULL; in perf_evlist__delete() 286 int nr_cpus = cpu_map__nr(evlist->cpus); in perf_evlist__disable() 305 int nr_cpus = cpu_map__nr(evlist->cpus); in perf_evlist__enable() 324 int nr_cpus = cpu_map__nr(evlist->cpus); in perf_evlist__disable_event() 345 int nr_cpus = cpu_map__nr(evlist->cpus); in perf_evlist__enable_event() 385 int nr_cpus = cpu_map__nr(evlist->cpus); in perf_evlist__enable_event_thread() 401 bool per_cpu_mmaps = !cpu_map__empty(evlist->cpus); in perf_evlist__enable_event_idx() [all …]
|
D | cpumap.h | 22 int cpu_map__build_socket_map(struct cpu_map *cpus, struct cpu_map **sockp); 23 int cpu_map__build_core_map(struct cpu_map *cpus, struct cpu_map **corep);
|
D | evlist.h | 52 struct cpu_map *cpus; member 63 void perf_evlist__init(struct perf_evlist *evlist, struct cpu_map *cpus, 144 struct cpu_map *cpus, in perf_evlist__set_maps() argument 147 evlist->cpus = cpus; in perf_evlist__set_maps()
|
D | top.c | 98 top->evlist->cpus->nr > 1 ? "s" : "", in perf_top__header_snprintf() 105 top->evlist->cpus->nr, in perf_top__header_snprintf() 106 top->evlist->cpus->nr > 1 ? "s" : ""); in perf_top__header_snprintf()
|
D | python.c | 366 struct cpu_map *cpus; member 379 pcpus->cpus = cpu_map__new(cpustr); in pyrf_cpu_map__init() 380 if (pcpus->cpus == NULL) in pyrf_cpu_map__init() 387 cpu_map__delete(pcpus->cpus); in pyrf_cpu_map__delete() 395 return pcpus->cpus->nr; in pyrf_cpu_map__length() 402 if (i >= pcpus->cpus->nr) in pyrf_cpu_map__item() 405 return Py_BuildValue("i", pcpus->cpus->map[i]); in pyrf_cpu_map__item() 622 struct cpu_map *cpus = NULL; in pyrf_evsel__open() local 636 cpus = ((struct pyrf_cpu_map *)pcpus)->cpus; in pyrf_evsel__open() 643 if (perf_evsel__open(evsel, cpus, threads) < 0) { in pyrf_evsel__open() [all …]
|
D | evsel.h | 79 struct cpu_map *cpus; member 183 struct cpu_map *cpus); 186 int perf_evsel__open(struct perf_evsel *evsel, struct cpu_map *cpus,
|
D | pmu.h | 22 struct cpu_map *cpus; member
|
/tools/power/cpupower/utils/ |
D | cpufreq-info.c | 250 struct cpufreq_affected_cpus *cpus; in debug_output_one() local 273 cpus = cpufreq_get_related_cpus(cpu); in debug_output_one() 274 if (cpus) { in debug_output_one() 276 while (cpus->next) { in debug_output_one() 277 printf("%d ", cpus->cpu); in debug_output_one() 278 cpus = cpus->next; in debug_output_one() 280 printf("%d\n", cpus->cpu); in debug_output_one() 281 cpufreq_put_related_cpus(cpus); in debug_output_one() 284 cpus = cpufreq_get_affected_cpus(cpu); in debug_output_one() 285 if (cpus) { in debug_output_one() [all …]
|
D | cpufreq-set.c | 295 struct cpufreq_affected_cpus *cpus; in cmd_freq_set() local 301 cpus = cpufreq_get_related_cpus(cpu); in cmd_freq_set() 302 if (!cpus) in cmd_freq_set() 304 while (cpus->next) { in cmd_freq_set() 305 bitmask_setbit(cpus_chosen, cpus->cpu); in cmd_freq_set() 306 cpus = cpus->next; in cmd_freq_set() 308 cpufreq_put_related_cpus(cpus); in cmd_freq_set()
|
/tools/perf/python/ |
D | twatch.py | 19 cpus = perf.cpu_map() 25 evsel.open(cpus = cpus, threads = threads); 26 evlist = perf.evlist(cpus, threads) 31 for cpu in cpus:
|
/tools/power/cpupower/utils/helpers/ |
D | topology.c | 67 int cpu, last_pkg, cpus = sysconf(_SC_NPROCESSORS_CONF); in get_cpu_topology() local 69 cpu_top->core_info = malloc(sizeof(struct cpuid_core_info) * cpus); in get_cpu_topology() 73 for (cpu = 0; cpu < cpus; cpu++) { in get_cpu_topology() 88 qsort(cpu_top->core_info, cpus, sizeof(struct cpuid_core_info), in get_cpu_topology() 95 for(cpu = 1; cpu < cpus; cpu++) { in get_cpu_topology() 110 return cpus; in get_cpu_topology()
|
/tools/lib/traceevent/ |
D | plugin_function.c | 32 static int cpus = -1; variable 95 if (cpu > cpus) { in add_and_get_index() 107 for (i = cpus + 1; i <= cpu; i++) in add_and_get_index() 109 cpus = cpu; in add_and_get_index() 183 for (i = 0; i <= cpus; i++) { in PEVENT_PLUGIN_UNLOADER() 193 cpus = -1; in PEVENT_PLUGIN_UNLOADER()
|
/tools/virtio/virtio-trace/ |
D | trace-agent.c | 62 s->cpus = get_total_cpus(); in agent_info_new() 66 for (i = 0; i < s->cpus; i++) in agent_info_new() 159 for (cpu = 0; cpu < s->cpus; cpu++) { in agent_info_init() 226 for (cpu = 0; cpu < s->cpus; cpu++) in agent_main_loop() 232 for (cpu = 0; cpu < s->cpus; cpu++) { in agent_main_loop() 248 for (i = 0; i < s->cpus; i++) { in agent_info_free()
|
D | trace-agent.h | 20 int cpus; member
|
/tools/testing/selftests/rcutorture/bin/ |
D | kvm.sh | 48 cpus=0 98 --cpus) 99 checkarg --cpus "(number)" "$#" "$2" '^[0-9]*$' '^--' 100 cpus=$2 202 awk < $T/cfgcpu.sort > $T/cfgcpu.pack -v ncpus=$cpus ' 290 -v ncpus=$cpus \
|