Home
last modified time | relevance | path

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

1234567

/tools/lib/perf/
A Dcpumap.c43 if (cpus) in perf_cpu_map__new_any_cpu()
46 return cpus; in perf_cpu_map__new_any_cpu()
101 return cpus; in cpu_map__new_sysconf()
114 return cpus; in cpu_map__new_sysfs_online()
121 if (cpus) in perf_cpu_map__new_online_cpus()
122 return cpus; in perf_cpu_map__new_online_cpus()
162 return cpus; in cpu_map__trim_new()
249 if (cpus) in perf_cpu_map__new_int()
266 if (cpus && idx < __perf_cpu_map__nr(cpus)) in perf_cpu_map__cpu()
274 return cpus ? __perf_cpu_map__nr(cpus) : 1; in perf_cpu_map__nr()
[all …]
A Devlist.c39 if (perf_cpu_map__is_empty(evsel->cpus)) { in __perf_evlist__propagate_maps()
66 perf_cpu_map__put(evsel->cpus); in __perf_evlist__propagate_maps()
67 evsel->cpus = perf_cpu_map__get(evsel->pmu_cpus); in __perf_evlist__propagate_maps()
77 perf_cpu_map__put(evsel->cpus); in __perf_evlist__propagate_maps()
83 if (!perf_cpu_map__has_any_cpu(evsel->cpus) && in __perf_evlist__propagate_maps()
87 perf_cpu_map__put(evsel->cpus); in __perf_evlist__propagate_maps()
88 evsel->cpus = tmp; in __perf_evlist__propagate_maps()
100 perf_cpu_map__put(evsel->cpus); in __perf_evlist__propagate_maps()
111 if (perf_cpu_map__is_empty(evsel->cpus)) { in __perf_evlist__propagate_maps()
232 struct perf_cpu_map *cpus, in perf_evlist__set_maps() argument
[all …]
/tools/lib/perf/tests/
A Dtest-cpumap.c16 struct perf_cpu_map *cpus; in test_cpumap() local
24 cpus = perf_cpu_map__new_any_cpu(); in test_cpumap()
25 if (!cpus) in test_cpumap()
28 perf_cpu_map__get(cpus); in test_cpumap()
29 perf_cpu_map__put(cpus); in test_cpumap()
30 perf_cpu_map__put(cpus); in test_cpumap()
32 cpus = perf_cpu_map__new_online_cpus(); in test_cpumap()
33 if (!cpus) in test_cpumap()
36 perf_cpu_map__for_each_cpu(cpu, idx, cpus) in test_cpumap()
39 perf_cpu_map__put(cpus); in test_cpumap()
A Dtest-evlist.c36 struct perf_cpu_map *cpus; in test_stat_cpu() local
49 cpus = perf_cpu_map__new_online_cpus(); in test_stat_cpu()
50 __T("failed to create cpus", cpus); in test_stat_cpu()
75 cpus = perf_evsel__cpus(evsel); in test_stat_cpu()
88 perf_cpu_map__put(cpus); in test_stat_cpu()
218 struct perf_cpu_map *cpus; in test_mmap_thread() local
264 cpus = perf_cpu_map__new_any_cpu(); in test_mmap_thread()
265 __T("failed to create cpus", cpus); in test_mmap_thread()
313 perf_cpu_map__put(cpus); in test_mmap_thread()
329 struct perf_cpu_map *cpus; in test_mmap_cpus() local
[all …]
/tools/testing/selftests/riscv/hwprobe/
A Dwhich-cpus.c29 static void print_cpulist(cpu_set_t *cpus) in print_cpulist() argument
33 if (!CPU_COUNT(cpus)) { in print_cpulist()
40 if (start != end && !CPU_ISSET(c, cpus)) in print_cpulist()
43 while (!CPU_ISSET(c, cpus)) in print_cpulist()
80 print_cpulist(cpus); in do_which_cpus()
87 cpu_set_t cpus_aff, cpus; in main() local
116 CPU_ZERO(&cpus); in main()
125 CPU_ZERO(&cpus); in main()
131 CPU_ZERO(&cpus); in main()
137 CPU_ZERO(&cpus); in main()
[all …]
A Dcbo.c93 cpu_set_t *cpus = (cpu_set_t *)arg; in test_zicbom() local
97 rc = riscv_hwprobe(&pair, 1, sizeof(cpu_set_t), (unsigned long *)cpus, 0); in test_zicbom()
117 cpu_set_t *cpus = (cpu_set_t *)arg; in test_zicboz() local
160 static void check_no_zicbo_cpus(cpu_set_t *cpus, __u64 cbo) in check_no_zicbo_cpus() argument
170 while (i++ < CPU_COUNT(cpus)) { in check_no_zicbo_cpus()
171 while (!CPU_ISSET(c, cpus)) in check_no_zicbo_cpus()
219 cpu_set_t cpus; in main() local
231 rc = sched_getaffinity(0, sizeof(cpu_set_t), &cpus); in main()
246 check_no_zicbo_cpus(&cpus, RISCV_HWPROBE_EXT_ZICBOZ); in main()
253 check_no_zicbo_cpus(&cpus, RISCV_HWPROBE_EXT_ZICBOM); in main()
[all …]
A Dhwprobe.c8 unsigned long cpus; in main() local
15 cpus = -1; in main()
24 out = riscv_hwprobe(pairs, 8, 1, &cpus, 0); in main()
46 out = riscv_hwprobe(pairs, 8, 0, &cpus, 0); in main()
53 out = riscv_hwprobe(pairs, 1, 1, &cpus, 0); in main()
A DMakefile7 TEST_GEN_PROGS := hwprobe cbo which-cpus
17 $(OUTPUT)/which-cpus: which-cpus.c sys_hwprobe.S
/tools/lib/perf/include/perf/
A Dcpumap.h60 LIBPERF_API int perf_cpu_map__nr(const struct perf_cpu_map *cpus);
90 #define perf_cpu_map__for_each_cpu(cpu, idx, cpus) \ argument
91 for ((idx) = 0, (cpu) = perf_cpu_map__cpu(cpus, idx); \
92 (idx) < perf_cpu_map__nr(cpus); \
93 (idx)++, (cpu) = perf_cpu_map__cpu(cpus, idx))
95 #define perf_cpu_map__for_each_cpu_skip_any(_cpu, idx, cpus) \ argument
96 for ((idx) = 0, (_cpu) = perf_cpu_map__cpu(cpus, idx); \
97 (idx) < perf_cpu_map__nr(cpus); \
98 (idx)++, (_cpu) = perf_cpu_map__cpu(cpus, idx)) \
101 #define perf_cpu_map__for_each_idx(idx, cpus) \ argument
[all …]
/tools/testing/selftests/cgroup/
A Dtest_cpuset_prs.sh79 echo 0-6 > test/cpuset.cpus
84 echo "" > test/cpuset.cpus
530 CFILE=$CGRP/cpuset.cpus
627 CPUS=$DIR/cpuset.cpus
995 echo "1-7" > cpuset.cpus
1060 echo 2-3 > cpuset.cpus
1091 echo 2-3 > cpuset.cpus
1105 echo 2 > cpuset.cpus
1109 echo 2-3 > cpuset.cpus
1150 echo 1 > cpuset.cpus
[all …]
/tools/perf/tests/
A Dopenat-syscall-all-cpus.c27 struct perf_cpu_map *cpus; in test__openat_syscall_event_on_all_cpus() local
40 cpus = perf_cpu_map__new_online_cpus(); in test__openat_syscall_event_on_all_cpus()
41 if (cpus == NULL) { in test__openat_syscall_event_on_all_cpus()
56 if (evsel__open(evsel, cpus, threads) < 0) { in test__openat_syscall_event_on_all_cpus()
64 perf_cpu_map__for_each_cpu(cpu, idx, cpus) { in test__openat_syscall_event_on_all_cpus()
91 evsel->core.cpus = perf_cpu_map__get(cpus); in test__openat_syscall_event_on_all_cpus()
95 perf_cpu_map__for_each_cpu(cpu, idx, cpus) { in test__openat_syscall_event_on_all_cpus()
121 perf_cpu_map__put(cpus); in test__openat_syscall_event_on_all_cpus()
A Devent-times.c113 struct perf_cpu_map *cpus; in attach__cpu_disabled() local
118 cpus = perf_cpu_map__new("0"); in attach__cpu_disabled()
119 if (cpus == NULL) { in attach__cpu_disabled()
126 err = evsel__open_per_cpu(evsel, cpus, -1); in attach__cpu_disabled()
127 perf_cpu_map__put(cpus); in attach__cpu_disabled()
142 struct perf_cpu_map *cpus; in attach__cpu_enabled() local
147 cpus = perf_cpu_map__new("0"); in attach__cpu_enabled()
148 if (cpus == NULL) { in attach__cpu_enabled()
153 err = evsel__open_per_cpu(evsel, cpus, -1); in attach__cpu_enabled()
154 perf_cpu_map__put(cpus); in attach__cpu_enabled()
A Dmmap-basic.c40 struct perf_cpu_map *cpus; in test__basic_mmap() local
58 cpus = perf_cpu_map__new_online_cpus(); in test__basic_mmap()
59 if (cpus == NULL) { in test__basic_mmap()
65 CPU_SET(perf_cpu_map__cpu(cpus, 0).cpu, &cpu_set); in test__basic_mmap()
69 perf_cpu_map__cpu(cpus, 0).cpu, in test__basic_mmap()
172 perf_cpu_map__put(cpus); in test__basic_mmap()
261 if (pmu->cpus != NULL) in test_stat_user_read()
262 cpu_map__set_affinity(pmu->cpus); in test_stat_user_read()
363 if (pmu->cpus != NULL) { in test_stat_user_read()
366 cpu_map__set_affinity(cpus); in test_stat_user_read()
[all …]
A Dsw-clock.c46 struct perf_cpu_map *cpus = NULL; in __test__sw_clock_freq() local
65 cpus = perf_cpu_map__new_any_cpu(); in __test__sw_clock_freq()
67 if (!cpus || !threads) { in __test__sw_clock_freq()
73 perf_evlist__set_maps(&evlist->core, cpus, threads); in __test__sw_clock_freq()
134 perf_cpu_map__put(cpus); in __test__sw_clock_freq()
/tools/perf/util/
A Dperf_api_probe.c63 struct perf_cpu_map *cpus; in perf_probe_api() local
67 cpus = perf_cpu_map__new_online_cpus(); in perf_probe_api()
68 if (!cpus) in perf_probe_api()
70 cpu = perf_cpu_map__cpu(cpus, 0); in perf_probe_api()
71 perf_cpu_map__put(cpus); in perf_probe_api()
139 struct perf_cpu_map *cpus; in perf_can_record_cpu_wide() local
143 cpus = perf_cpu_map__new_online_cpus(); in perf_can_record_cpu_wide()
144 if (!cpus) in perf_can_record_cpu_wide()
147 cpu = perf_cpu_map__cpu(cpus, 0); in perf_can_record_cpu_wide()
148 perf_cpu_map__put(cpus); in perf_can_record_cpu_wide()
/tools/testing/selftests/rcutorture/bin/
A Djitter.sh58 if cpus=`grep 1 /sys/devices/system/cpu/*/online 2>&1 |
63 cpus=
66 cpus="$cpus $nohotplugcpus"
68 cpumask=`awk -v cpus="$cpus" -v me=$me -v n=$n 'BEGIN {
/tools/perf/python/
A Dtwatch.py12 cpus = perf.cpu_map()
28 evsel.open(cpus = cpus, threads = threads);
29 evlist = perf.evlist(cpus, threads)
34 for cpu in cpus:
/tools/tracing/rtla/src/
A Dtimerlat_bpf.c129 int cpus) in get_value() argument
135 sizeof(long long) * cpus, 0); in get_value()
140 sizeof(long long) * cpus, 0); in get_value()
145 sizeof(long long) * cpus, 0); in get_value()
158 int cpus) in timerlat_bpf_get_hist_value() argument
163 key, value_irq, value_thread, value_user, cpus); in timerlat_bpf_get_hist_value()
173 int cpus) in timerlat_bpf_get_summary_value() argument
178 key, value_irq, value_thread, value_user, cpus); in timerlat_bpf_get_summary_value()
A Dtimerlat_bpf.h26 int cpus);
31 int cpus);
48 int cpus) in timerlat_bpf_get_hist_value() argument
56 int cpus) in timerlat_bpf_get_summary_value() argument
/tools/testing/selftests/cpufreq/
A Dcpu.sh17 cpus=$(ls $CPUROOT | grep "cpu[0-9].*")
18 for cpu in $cpus; do
25 cpus=$(ls $CPUROOT | grep "cpu[1-9].*")
26 for cpu in $cpus; do
/tools/power/cpupower/utils/
A Dcpufreq-set.c299 struct cpufreq_affected_cpus *cpus; in cmd_freq_set() local
305 cpus = cpufreq_get_related_cpus(cpu); in cmd_freq_set()
306 if (!cpus) in cmd_freq_set()
308 while (cpus->next) { in cmd_freq_set()
309 bitmask_setbit(cpus_chosen, cpus->cpu); in cmd_freq_set()
310 cpus = cpus->next; in cmd_freq_set()
313 bitmask_setbit(cpus_chosen, cpus->cpu); in cmd_freq_set()
314 cpufreq_put_related_cpus(cpus); in cmd_freq_set()
A Dcpufreq-info.c365 if (!cpus) { in get_affected_cpus()
370 while (cpus->next) { in get_affected_cpus()
371 printf("%d ", cpus->cpu); in get_affected_cpus()
372 cpus = cpus->next; in get_affected_cpus()
374 printf("%d\n", cpus->cpu); in get_affected_cpus()
386 if (!cpus) { in get_related_cpus()
391 while (cpus->next) { in get_related_cpus()
392 printf("%d ", cpus->cpu); in get_related_cpus()
393 cpus = cpus->next; in get_related_cpus()
395 printf("%d\n", cpus->cpu); in get_related_cpus()
[all …]
/tools/lib/perf/Documentation/examples/
A Dsampling.c28 struct perf_cpu_map *cpus; in main() local
42 cpus = perf_cpu_map__new_online_cpus(); in main()
43 if (!cpus) { in main()
62 perf_evlist__set_maps(evlist, cpus, NULL); in main()
117 perf_cpu_map__put(cpus); in main()
/tools/testing/selftests/bpf/prog_tests/
A Dhtab_update.c51 cpu_set_t cpus; in htab_update_thread() local
55 CPU_ZERO(&cpus); in htab_update_thread()
56 CPU_SET(0, &cpus); in htab_update_thread()
57 pthread_setaffinity_np(pthread_self(), sizeof(cpus), &cpus); in htab_update_thread()
/tools/perf/arch/arm/util/
A Dpmu.c44 intersect = perf_cpu_map__intersect(online, pmu->cpus); in perf_pmu__arch_init()
46 perf_cpu_map__put(pmu->cpus); in perf_pmu__arch_init()
47 pmu->cpus = intersect; in perf_pmu__arch_init()

Completed in 724 milliseconds

1234567