Home
last modified time | relevance | path

Searched refs:cpu (Results 1 – 25 of 524) sorted by relevance

12345678910>>...21

/tools/testing/selftests/cpu-hotplug/
A Dcpu-on-off-test.sh27 if ! ls $SYSFS/devices/system/cpu/cpu* > /dev/null 2>&1; then
63 for cpu in $SYSFS/devices/system/cpu/cpu*; do
64 if [ -f $cpu/online ] && grep -q $state $cpu/online; then
82 grep -q 1 $SYSFS/devices/system/cpu/cpu$1/online
87 grep -q 0 $SYSFS/devices/system/cpu/cpu$1/online
92 echo 1 > $SYSFS/devices/system/cpu/cpu$1/online
97 echo 0 > $SYSFS/devices/system/cpu/cpu$1/online
102 local cpu=$1
115 local cpu=$1
128 local cpu=$1
[all …]
/tools/perf/tests/
A Dtopology.c118 cpu.cpu = i; in check_cpu_topology()
130 cpu.cpu == id.cpu.cpu); in check_cpu_topology()
133 env->cpu[cpu.cpu].core_id == id.core); in check_cpu_topology()
135 env->cpu[cpu.cpu].socket_id == id.socket); in check_cpu_topology()
138 env->cpu[cpu.cpu].die_id == id.die); in check_cpu_topology()
147 env->cpu[cpu.cpu].core_id == id.core); in check_cpu_topology()
150 env->cpu[cpu.cpu].socket_id == id.socket); in check_cpu_topology()
153 env->cpu[cpu.cpu].die_id == id.die); in check_cpu_topology()
162 env->cpu[cpu.cpu].socket_id == id.socket); in check_cpu_topology()
165 env->cpu[cpu.cpu].die_id == id.die); in check_cpu_topology()
[all …]
A Dopenat-syscall-all-cpus.c26 struct perf_cpu cpu; in test__openat_syscall_event_on_all_cpus() local
64 perf_cpu_map__for_each_cpu(cpu, idx, cpus) { in test__openat_syscall_event_on_all_cpus()
72 if (cpu.cpu >= CPU_SETSIZE) { in test__openat_syscall_event_on_all_cpus()
73 pr_debug("Ignoring CPU %d\n", cpu.cpu); in test__openat_syscall_event_on_all_cpus()
77 CPU_SET(cpu.cpu, &cpu_set); in test__openat_syscall_event_on_all_cpus()
80 cpu.cpu, in test__openat_syscall_event_on_all_cpus()
88 CPU_CLR(cpu.cpu, &cpu_set); 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()
98 if (cpu.cpu >= CPU_SETSIZE) in test__openat_syscall_event_on_all_cpus()
110 expected, cpu.cpu, perf_counts(evsel->counts, idx, 0)->val); in test__openat_syscall_event_on_all_cpus()
/tools/power/cpupower/lib/
A Dcpufreq.h31 unsigned int cpu; member
57 unsigned long cpufreq_get_freq_kernel(unsigned int cpu);
61 #define cpufreq_get(cpu) cpufreq_get_freq_kernel(cpu); argument
85 int cpufreq_get_hardware_limits(unsigned int cpu,
96 char *cpufreq_get_driver(unsigned int cpu);
122 *cpufreq_get_available_governors(unsigned int cpu);
136 *cpufreq_get_available_frequencies(unsigned int cpu);
142 *cpufreq_get_boost_frequencies(unsigned int cpu);
155 int cpu);
167 int cpu);
[all …]
A Dcpupower.c125 cpu, fname); in sysfs_topology_read_file()
146 else if (top1->cpu < top2->cpu) in __compare()
148 else if (top1->cpu > top2->cpu) in __compare()
178 for (cpu = 0; cpu < cpus; cpu++) { in get_cpu_topology()
179 cpu_top->core_info[cpu].cpu = cpu; in get_cpu_topology()
180 cpu_top->core_info[cpu].is_online = cpupower_is_cpu_online(cpu); in get_cpu_topology()
182 cpu, in get_cpu_topology()
190 cpu, in get_cpu_topology()
202 cpu, "core_cpus_list"); in get_cpu_topology()
219 for (cpu = 1; cpu < cpus; cpu++) { in get_cpu_topology()
[all …]
A Dcpuidle.c38 cpu, idlestate, fname); in cpuidle_state_file_exists()
61 cpu, idlestate, fname); in cpuidle_state_read_file()
96 cpu, idlestate, fname); in cpuidle_state_write_file()
147 len = cpuidle_state_read_file(cpu, idlestate, in cpuidle_state_get_one_value()
186 len = cpuidle_state_read_file(cpu, idlestate, in cpuidle_state_get_one_string()
209 int cpuidle_is_state_disabled(unsigned int cpu, in cpuidle_is_state_disabled() argument
212 if (cpuidle_state_count(cpu) <= idlestate) in cpuidle_is_state_disabled()
215 if (!cpuidle_state_file_exists(cpu, idlestate, in cpuidle_is_state_disabled()
230 int cpuidle_state_disable(unsigned int cpu, in cpuidle_state_disable() argument
237 if (cpuidle_state_count(cpu) <= idlestate) in cpuidle_state_disable()
[all …]
A Dcpuidle.h5 int cpuidle_is_state_disabled(unsigned int cpu,
7 int cpuidle_state_disable(unsigned int cpu, unsigned int idlestate,
9 unsigned long cpuidle_state_latency(unsigned int cpu,
11 unsigned long cpuidle_state_residency(unsigned int cpu,
13 unsigned long cpuidle_state_usage(unsigned int cpu,
15 unsigned long long cpuidle_state_time(unsigned int cpu,
17 char *cpuidle_state_name(unsigned int cpu,
19 char *cpuidle_state_desc(unsigned int cpu,
21 unsigned int cpuidle_state_count(unsigned int cpu);
/tools/power/cpupower/utils/
A Dcpufreq-info.c58 unsigned int cpu, nr_cpus; in proc_cpufreq_output() local
67 for (cpu = 0; cpu < nr_cpus; cpu++) { in proc_cpufreq_output()
480 get_driver(cpu); in debug_output_one()
481 get_related_cpus(cpu); in debug_output_one()
483 get_latency(cpu, 1); in debug_output_one()
484 get_epp(cpu, true); in debug_output_one()
501 get_policy(cpu); in debug_output_one()
504 get_boost_mode(cpu); in debug_output_one()
505 get_perf_cap(cpu); in debug_output_one()
534 unsigned int cpu = 0; in cmd_freq_info() local
[all …]
A Dcpuidle-info.c28 idlestates = cpuidle_state_count(cpu); in cpuidle_cpu_output()
30 printf(_("CPU %u: No idle states\n"), cpu); in cpuidle_cpu_output()
37 tmp = cpuidle_state_name(cpu, idlestate); in cpuidle_cpu_output()
53 tmp = cpuidle_state_name(cpu, idlestate); in cpuidle_cpu_output()
104 cstates = cpuidle_state_count(cpu); in proc_cpuidle_cpu_output()
145 unsigned int cpu = 0; in cmd_idle_info() local
190 for (cpu = bitmask_first(cpus_chosen); in cmd_idle_info()
191 cpu <= bitmask_last(cpus_chosen); cpu++) { in cmd_idle_info()
198 if (sysfs_is_cpu_online(cpu) != 1) { in cmd_idle_info()
207 proc_cpuidle_cpu_output(cpu); in cmd_idle_info()
[all …]
A Dcpuidle-set.c103 cpu <= bitmask_last(cpus_chosen); cpu++) { in cmd_idle_set()
122 idlestate, cpu); in cmd_idle_set()
127 idlestate, cpu); in cmd_idle_set()
135 idlestate, cpu); in cmd_idle_set()
140 idlestate, cpu); in cmd_idle_set()
145 (cpu, idlestate); in cmd_idle_set()
147 (cpu, idlestate); in cmd_idle_set()
151 (cpu, idlestate, 0); in cmd_idle_set()
159 (cpu, idlestate, 1); in cmd_idle_set()
168 (cpu, idlestate); in cmd_idle_set()
[all …]
/tools/power/cpupower/utils/idle_monitor/
A Dmperf_monitor.c35 unsigned int cpu);
168 mperf_diff = mperf_current_count[cpu] - mperf_previous_count[cpu]; in mperf_get_count_percent()
169 aperf_diff = aperf_current_count[cpu] - aperf_previous_count[cpu]; in mperf_get_count_percent()
172 tsc_diff = tsc_at_measure_end[cpu] - tsc_at_measure_start[cpu]; in mperf_get_count_percent()
204 mperf_diff = mperf_current_count[cpu] - mperf_previous_count[cpu]; in mperf_get_count_freq()
209 tsc_diff = tsc_at_measure_end[cpu] - tsc_at_measure_start[cpu]; in mperf_get_count_freq()
210 time_diff = timespec_diff_us(time_start[cpu], time_end[cpu]); in mperf_get_count_freq()
227 int cpu; in mperf_start() local
229 for (cpu = 0; cpu < cpu_count; cpu++) { in mperf_start()
240 int cpu; in mperf_stop() local
[all …]
A Dhsw_ext_idle.c63 unsigned int cpu) in hsw_ext_get_count() argument
93 if (!is_valid[cpu]) in hsw_ext_get_count_percent()
97 (current_count[id][cpu] - previous_count[id][cpu])) / in hsw_ext_get_count_percent()
102 current_count[id][cpu], cpu); in hsw_ext_get_count_percent()
107 current_count[id][cpu] - previous_count[id][cpu], in hsw_ext_get_count_percent()
115 int num, cpu; in hsw_ext_start() local
119 for (cpu = 0; cpu < cpu_count; cpu++) { in hsw_ext_start()
120 is_valid[cpu] = !hsw_ext_get_count(num, &val, cpu); in hsw_ext_start()
131 int num, cpu; in hsw_ext_stop() local
136 for (cpu = 0; cpu < cpu_count; cpu++) { in hsw_ext_stop()
[all …]
A Dsnb_idle.c61 unsigned int cpu) in snb_get_count() argument
91 if (!is_valid[cpu]) in snb_get_count_percent()
95 (current_count[id][cpu] - previous_count[id][cpu])) / in snb_get_count_percent()
100 current_count[id][cpu], cpu); in snb_get_count_percent()
105 current_count[id][cpu] - previous_count[id][cpu], in snb_get_count_percent()
113 int num, cpu; in snb_start() local
117 for (cpu = 0; cpu < cpu_count; cpu++) { in snb_start()
118 is_valid[cpu] = !snb_get_count(num, &val, cpu); in snb_start()
129 int num, cpu; in snb_stop() local
134 for (cpu = 0; cpu < cpu_count; cpu++) { in snb_stop()
[all …]
A Dnhm_idle.c72 unsigned int cpu) in nhm_get_count() argument
106 if (!is_valid[cpu]) in nhm_get_count_percent()
110 (current_count[id][cpu] - previous_count[id][cpu])) / in nhm_get_count_percent()
115 current_count[id][cpu], cpu); in nhm_get_count_percent()
120 current_count[id][cpu] - previous_count[id][cpu], in nhm_get_count_percent()
128 int num, cpu; in nhm_start() local
134 for (cpu = 0; cpu < cpu_count; cpu++) { in nhm_start()
135 is_valid[cpu] = !nhm_get_count(num, &val, cpu); in nhm_start()
148 int num, cpu; in nhm_stop() local
153 for (cpu = 0; cpu < cpu_count; cpu++) { in nhm_stop()
[all …]
/tools/perf/util/
A Dcpumap.c143 RC_CHK_ACCESS(map)->map[i].cpu = cpu; in cpu_map__from_range()
388 id.cpu = cpu; in aggr_cpu_id__cpu()
406 cpu.cpu = 0; in aggr_cpu_id__global()
407 id.cpu = cpu; in aggr_cpu_id__global()
551 return cpunode_map[cpu.cpu]; in cpu__get_node()
697 bitmap[c.cpu / 8] |= 1 << (c.cpu % 8); in cpu_map__snprint_mask()
699 for (int cpu = last_cpu.cpu / 4 * 4; cpu >= 0; cpu -= 4) { in cpu_map__snprint_mask() local
708 if ((cpu % 32) == 0 && cpu > 0) in cpu_map__snprint_mask()
738 a->cpu.cpu == b->cpu.cpu; in aggr_cpu_id__equal()
751 a->cpu.cpu == -1; in aggr_cpu_id__is_empty()
[all …]
/tools/perf/scripts/python/
A Dstat-cpi.py10 def get_key(time, event, cpu, thread): argument
11 return "%d-%s-%d-%d" % (time, event, cpu, thread)
13 def store_key(time, cpu, thread): argument
17 if (cpu not in cpus):
18 cpus.append(cpu)
23 def store(time, event, cpu, thread, val, ena, run): argument
27 store_key(time, cpu, thread)
28 key = get_key(time, event, cpu, thread)
31 def get(time, event, cpu, thread): argument
32 key = get_key(time, event, cpu, thread)
[all …]
/tools/testing/selftests/net/forwarding/
A Dtsn_lib.sh111 local cpu=$1
112 local freq="cpu${cpu}_freq"
116 if ! [ -d /sys/bus/cpu/devices/cpu${cpu}/cpufreq ]; then
125 cat /sys/bus/cpu/devices/cpu${cpu}/cpufreq/scaling_max_freq > \
126 /sys/bus/cpu/devices/cpu${cpu}/cpufreq/scaling_min_freq
128 /sys/bus/cpu/devices/cpu${cpu}/cpufreq/scaling_governor
133 local cpu=$1
134 local freq="cpu${cpu}_freq"
137 if ! [ -d /sys/bus/cpu/devices/cpu${cpu}/cpufreq ]; then
141 echo "${!freq}" > /sys/bus/cpu/devices/cpu${cpu}/cpufreq/scaling_min_freq
[all …]
/tools/power/cpupower/utils/helpers/
A Dhelpers.h116 extern int cpupower_intel_get_perf_bias(unsigned int cpu);
117 extern unsigned long long msr_intel_get_turbo_ratio(unsigned int cpu);
119 extern int cpupower_set_epp(unsigned int cpu, char *epp);
137 extern int decode_pstates(unsigned int cpu, int boost_states,
142 extern int cpufreq_has_boost_support(unsigned int cpu, int *support,
147 void amd_pstate_boost_init(unsigned int cpu,
149 void amd_pstate_show_perf_and_freq(unsigned int cpu,
165 static inline int decode_pstates(unsigned int cpu, int boost_states, in decode_pstates() argument
175 static inline int cpupower_intel_get_perf_bias(unsigned int cpu) in cpupower_intel_get_perf_bias() argument
180 static inline int cpupower_set_epp(unsigned int cpu, char *epp) in cpupower_set_epp() argument
[all …]
A Dsysfs.h11 extern unsigned int sysfs_idlestate_file_exists(unsigned int cpu,
15 extern int sysfs_is_cpu_online(unsigned int cpu);
17 extern int sysfs_is_idlestate_disabled(unsigned int cpu,
19 extern int sysfs_idlestate_disable(unsigned int cpu, unsigned int idlestate,
21 extern unsigned long sysfs_get_idlestate_latency(unsigned int cpu,
23 extern unsigned long sysfs_get_idlestate_usage(unsigned int cpu,
25 extern unsigned long long sysfs_get_idlestate_time(unsigned int cpu,
27 extern char *sysfs_get_idlestate_name(unsigned int cpu,
29 extern char *sysfs_get_idlestate_desc(unsigned int cpu,
31 extern unsigned int sysfs_get_idlestate_count(unsigned int cpu);
A Dsysfs.c47 int sysfs_is_cpu_online(unsigned int cpu) in sysfs_is_cpu_online() argument
112 cpu, idlestate, fname); in sysfs_idlestate_file_exists()
132 cpu, idlestate, fname); in sysfs_idlestate_read_file()
167 cpu, idlestate, fname); in sysfs_idlestate_write_file()
215 len = sysfs_idlestate_read_file(cpu, idlestate, in sysfs_idlestate_get_one_value()
254 len = sysfs_idlestate_read_file(cpu, idlestate, in sysfs_idlestate_get_one_string()
277 int sysfs_is_idlestate_disabled(unsigned int cpu, in sysfs_is_idlestate_disabled() argument
280 if (sysfs_get_idlestate_count(cpu) <= idlestate) in sysfs_is_idlestate_disabled()
283 if (!sysfs_idlestate_file_exists(cpu, idlestate, in sysfs_is_idlestate_disabled()
298 int sysfs_idlestate_disable(unsigned int cpu, in sysfs_idlestate_disable() argument
[all …]
/tools/testing/selftests/sched_ext/
A Dallowed_cpus.bpf.c20 if (scx_bpf_test_and_clear_cpu_idle(cpu)) in validate_idle_cpu()
24 !bpf_cpumask_test_cpu(cpu, allowed)) in validate_idle_cpu()
26 cpu, p->pid, p->comm); in validate_idle_cpu()
33 s32 cpu; in BPF_STRUCT_OPS() local
45 if (cpu >= 0) { in BPF_STRUCT_OPS()
46 validate_idle_cpu(p, allowed, cpu); in BPF_STRUCT_OPS()
49 return cpu; in BPF_STRUCT_OPS()
73 if (cpu >= 0) { in BPF_STRUCT_OPS()
74 validate_idle_cpu(p, allowed, cpu); in BPF_STRUCT_OPS()
122 int cpu; in select_cpu_from_user() local
[all …]
/tools/power/x86/x86_energy_perf_policy/
A Dx86_energy_perf_policy.c364 int cpu; in validate_cpu_selected_set() local
369 for (cpu = 0; cpu <= max_cpu_num; ++cpu) { in validate_cpu_selected_set()
379 int cpu = 0; in parse_cmdline_cpu() local
409 cpu++; in parse_cmdline_cpu()
416 for (cpu = 0; cpu <= max_cpu_num; cpu += 1) { in parse_cmdline_cpu()
426 for (cpu = 0; cpu <= max_cpu_num; cpu += 2) { in parse_cmdline_cpu()
437 for (cpu = 1; cpu <= max_cpu_num; cpu += 2) { in parse_cmdline_cpu()
771 if (cpu != -1) in print_hwp_cap()
791 if (cpu != -1) in print_hwp_request()
898 epb = get_epb(cpu); in print_cpu_msrs()
[all …]
/tools/power/cpupower/debug/i386/
A Dcentrino-decode.c28 static int rdmsr(unsigned int cpu, unsigned int msr, in rdmsr() argument
38 if (cpu > MCPU) in rdmsr()
41 sprintf(file, "/dev/cpu/%d/msr", cpu); in rdmsr()
75 static int decode_live(unsigned int cpu) in decode_live() argument
80 err = rdmsr(cpu, MSR_IA32_PERF_STATUS, &lo, &hi); in decode_live()
96 unsigned int cpu, mode = 0; in main() local
99 cpu = 0; in main()
101 cpu = strtoul(argv[1], NULL, 0); in main()
102 if (cpu >= MCPU) in main()
107 decode(cpu); in main()
[all …]
/tools/testing/selftests/ftrace/test.d/ftrace/
A Dfunc_hotplug.tc8 ls -d /sys/devices/system/cpu/cpu[0-9]* | wc -l
20 for i in /sys/devices/system/cpu/cpu[1-9]*; do
22 cpu=$i
27 if [ -z "$cpu" ]; then
35 : "Set $(basename $cpu) offline/online with function tracer enabled"
38 (echo 0 > $cpu/online)
40 (echo 1 > $cpu/online)
/tools/tracing/rtla/src/
A Dtimerlat_hist.c60 for (cpu = 0; cpu < data->nr_cpus; cpu++) { in timerlat_free_histogram()
102 for (cpu = 0; cpu < nr_cpus; cpu++) { in timerlat_alloc_histogram()
117 for (cpu = 0; cpu < nr_cpus; cpu++) { in timerlat_alloc_histogram()
185 int cpu = record->cpu; in timerlat_hist_handler() local
305 for (cpu = 0; cpu < data->nr_cpus; cpu++) { in timerlat_hist_header()
359 for (cpu = 0; cpu < data->nr_cpus; cpu++) { in timerlat_print_summary()
383 for (cpu = 0; cpu < data->nr_cpus; cpu++) { in timerlat_print_summary()
413 for (cpu = 0; cpu < data->nr_cpus; cpu++) { in timerlat_print_summary()
443 for (cpu = 0; cpu < data->nr_cpus; cpu++) { in timerlat_print_summary()
490 for (cpu = 0; cpu < data->nr_cpus; cpu++) { in timerlat_print_stats_all()
[all …]

Completed in 35 milliseconds

12345678910>>...21