Home
last modified time | relevance | path

Searched refs:cpus (Results 1 – 25 of 47) sorted by relevance

12

/tools/perf/tests/
Dopen-syscall-all-cpus.c10 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 …]
Dmmap-basic.c23 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()
Dkeep-tracking.c64 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()
Dperf-time-to-tsc.c49 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()
Dtask-exit.c61 evlist->cpus = cpu_map__dummy_new(); in test__task_exit()
63 if (!evlist->cpus || !evlist->threads) { in test__task_exit()
Dsw-clock.c53 evlist->cpus = cpu_map__dummy_new(); in __test__sw_clock_freq()
55 if (!evlist->cpus || !evlist->threads) { in __test__sw_clock_freq()
Dcode-reading.c406 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()
Dswitch-tracking.c322 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/
Dcpumap.c11 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 …]
Drecord.c60 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 …]
Devlist.c34 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 …]
Dcpumap.h22 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);
Devlist.h52 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()
Dtop.c98 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()
Dpython.c366 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 …]
Devsel.h79 struct cpu_map *cpus; member
183 struct cpu_map *cpus);
186 int perf_evsel__open(struct perf_evsel *evsel, struct cpu_map *cpus,
Dpmu.h22 struct cpu_map *cpus; member
/tools/power/cpupower/utils/
Dcpufreq-info.c250 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 …]
Dcpufreq-set.c295 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/
Dtwatch.py19 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/
Dtopology.c67 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/
Dplugin_function.c32 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/
Dtrace-agent.c62 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()
Dtrace-agent.h20 int cpus; member
/tools/testing/selftests/rcutorture/bin/
Dkvm.sh48 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 \

12