Home
last modified time | relevance | path

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

12345678910>>...13

/external/ltp/testcases/kernel/controllers/cpuset/cpuset_hierarchy_test/
Dcpuset_hierarchy_test.sh48 cpuset_log "father cpuset.cpus $(cat "$CPUSET/father/cpuset.cpus")"
49 cpuset_log "child cpuset.cpus $(cat "$CPUSET/father/child/cpuset.cpus")"
51 test -z "$(cat "$CPUSET/father/cpuset.cpus")" || return 1
52 test -z "$(cat "$CPUSET/father/child/cpuset.cpus")" || return 1
60 cpuset_log "father cpuset.cpus $(cat "$CPUSET/father/cpuset.cpus")"
61 cpuset_log "child cpuset.cpus $(cat "$CPUSET/father/child/cpuset.cpus")"
63 test -z "$(cat "$CPUSET/father/cpuset.cpus")" || return 1
64 test -z "$(cat "$CPUSET/father/child/cpuset.cpus")" || return 1
72 cpuset_log "father cpuset.cpus $(cat "$CPUSET/father/cpuset.cpus")"
73 cpuset_log "child cpuset.cpus $(cat "$CPUSET/father/child/cpuset.cpus")"
[all …]
/external/autotest/client/tests/tsc/src/
Dchecktsc.c72 int parse_cpu_set(const char *s, cpu_set_t *cpus) in parse_cpu_set() argument
74 CPU_ZERO(cpus); in parse_cpu_set()
114 CPU_SET(cpu, cpus); in parse_cpu_set()
179 cpu_set_t cpus; in set_cpu_affinity() local
181 CPU_ZERO(&cpus); in set_cpu_affinity()
182 CPU_SET(cpu, &cpus); in set_cpu_affinity()
183 if (sched_setaffinity(0, sizeof cpus, &cpus) < 0) { in set_cpu_affinity()
275 check_tsc(cpu_set_t *cpus) in check_tsc() argument
289 if (!CPU_ISSET(cpu_a, cpus)) in check_tsc()
293 if (!CPU_ISSET(cpu_b, cpus) || cpu_a == cpu_b) in check_tsc()
[all …]
/external/ltp/testcases/kernel/controllers/cpuset/cpuset_lib/
Dcpuinfo.c24 struct cpuinfo *cpus; variable
44 if (cpus != NULL) { in get_cpu_baseinfo()
45 free(cpus); in get_cpu_baseinfo()
46 cpus = NULL; in get_cpu_baseinfo()
50 cpus = malloc(sizeof(*cpus) * ncpus); in get_cpu_baseinfo()
51 if (cpus == NULL) in get_cpu_baseinfo()
53 memset(cpus, 0, sizeof(*cpus) * ncpus); in get_cpu_baseinfo()
74 cpus[ci].online = 1; in get_cpu_baseinfo()
104 if (cpus[i].online) in online_cpumask()
231 if (!cpus[ci].sched_domain) { in get_sched_domains()
[all …]
Dlibcpuset.c70 struct bitmask *cpus; member
620 if ((cp->cpus = bitmask_alloc(nbits)) == NULL) in cpuset_alloc()
629 if (cp && cp->cpus) in cpuset_alloc()
630 bitmask_free(cp->cpus); in cpuset_alloc()
642 if (cp->cpus) in cpuset_free()
643 bitmask_free(cp->cpus); in cpuset_free()
666 int cpuset_setcpus(struct cpuset *cp, const struct bitmask *cpus) in cpuset_setcpus() argument
668 if (cp->cpus) in cpuset_setcpus()
669 bitmask_free(cp->cpus); in cpuset_setcpus()
670 cp->cpus = bitmask_alloc(bitmask_nbits(cpus)); in cpuset_setcpus()
[all …]
/external/autotest/client/tests/monotonic_time/src/
Dthreads.c21 cpu_set_t cpus; member
38 if (sched_setaffinity(0, sizeof thread->cpus, &thread->cpus) < 0) in run_thread()
52 int create_per_cpu_threads(cpu_set_t *cpus, thread_func_t func, void *arg) in create_per_cpu_threads() argument
59 if (!CPU_ISSET(cpu, cpus)) in create_per_cpu_threads()
67 CPU_ZERO(&thread->cpus); in create_per_cpu_threads()
68 CPU_SET(cpu, &thread->cpus); in create_per_cpu_threads()
98 CPU_ZERO(&thread->cpus); in create_threads()
Dtime_test.c231 int run_test(cpu_set_t *cpus, long duration, struct test_info *test) in run_test() argument
256 ncpus = count_cpus(cpus); in run_test()
257 nthreads = create_per_cpu_threads(cpus, test_loop, test); in run_test()
309 cpu_set_t cpus; in main() local
328 CPU_SET(c, &cpus); in main()
336 if (parse_cpu_set(optarg, &cpus) != 0) in main()
381 sched_setaffinity(0, sizeof cpus, &cpus); in main()
382 if (sched_getaffinity(0, sizeof cpus, &cpus) < 0) { in main()
387 return run_test(&cpus, duration, test); in main()
Dcpuset.c16 int count_cpus(const cpu_set_t *cpus) in count_cpus() argument
22 if (CPU_ISSET(cpu, cpus)) in count_cpus()
32 int parse_cpu_set(const char *s, cpu_set_t *cpus) in parse_cpu_set() argument
34 CPU_ZERO(cpus); in parse_cpu_set()
73 CPU_SET(cpu, cpus); in parse_cpu_set()
110 int show_cpu_set(char *buf, size_t len, const cpu_set_t *cpus) in show_cpu_set() argument
119 if (CPU_ISSET(cpu, cpus)) { in show_cpu_set()
Dcpuset.h13 int count_cpus(const cpu_set_t *cpus);
14 int parse_cpu_set(const char *s, cpu_set_t *cpus);
15 int show_cpu_set(char *buf, size_t len, const cpu_set_t *cpus);
/external/ltp/testcases/kernel/controllers/cpuset/
Dcpuset_regression_test.sh63 cpus=cpuset.cpus
66 cpus=cpus
132 echo 0-1 > ${root_cpuset_dir}/testdir/${cpus}
135 "${root_cpuset_dir}/testdir/${cpus}' failed"
138 local cpus_value=$(cat ${root_cpuset_dir}/testdir/${cpus})
140 tst_brkm TFAIL "${cpus} is '${cpus_value}', expected '0-1'"
/external/ltp/testcases/kernel/controllers/cpuset/cpuset_base_ops_test/
Dcpuset_base_ops_testset.sh106 while read cpus result
108 base_op_test "$CPUSET/1/cpuset.cpus" "$cpus" "$result"
197 local cpus=$1
221 if [ "$cpus" != "NULL" ]; then
222 echo $cpus > "$CPUSET/sub_cpuset/cpuset.cpus"
236 …tst_resm TFAIL "Attaching Task Test failed!! cpus - \"$cpus\", mems - \"$mems\", Expect - \"$expec…
252 while read cpus mems expect
254 attach_task_test "$cpus" "$mems" "$expect"
265 for filename in cpus mems memory_pressure
/external/ltp/testcases/kernel/controllers/cpuset/cpuset_hotplug_test/
Dcpuset_hotplug_test.sh116 local cpus="$2"
132 cpuset_set "$path" "$cpus" "$mems_all" "0" 2> $CPUSET_TMP/stderr
158 cpus="`cat $path/cpuset.cpus`"
181 check_result "$cpus" "$expect_cpus"
190 if [ "$cpus" = "" ]; then
191 cpus="EMPTY"
193 tst_resm TFAIL "general group's cpus isn't expected(Result: $cpus, Expect: $expect_cpus)."
246 while read hotplug cpus cpus_expect task_expect
248 base_test "$hotplug" "$cpus" "$cpus_expect" "$task_expect"
/external/autotest/client/profilers/cpistat/
Dcpistat31 cpus = range(0, ncpus) variable
33 cpus = options.cpulist.split(',') variable
34 cpus = [ int(c) for c in cpus ] variable
42 s = perfmon.SystemWideSession(cpus, events)
61 for c in cpus:
69 for c in cpus:
/external/ltp/testcases/open_posix_testsuite/functional/threads/pi_test/
Dpitest-5.c50 int cpus; variable
194 DPRINTF(stdout, "# COLUMNS %d Time TL TP ", 2 + cpus); in thread_sample()
196 for (i = 0; i < (cpus - 1); i++) in thread_sample()
206 for (i = 0; i < cpus + 1; i++) in thread_sample()
257 cpus = sysconf(_SC_NPROCESSORS_ONLN); in main()
260 pthread_t threads[cpus - 1], threadsample, threadtp, threadtl, threadtb; in main()
283 DPRINTF(stderr, "Main Thread: Creating %d TF threads\n", cpus - 1); in main()
284 for (i = 0; i < cpus - 1; i++) { in main()
333 for (i = 2; i < cpus - 1; i++) { in main()
Dpitest-1.c49 int cpus; variable
177 DPRINTF(stdout, "# COLUMNS %d Time TL TP ", 2 + cpus); in thread_sample()
178 for (i = 0; i < (cpus - 1); i++) in thread_sample()
186 for (i = 0; i < cpus + 1; i++) in thread_sample()
233 cpus = sysconf(_SC_NPROCESSORS_ONLN); in main()
236 pthread_t threads[cpus - 1], threadsample, threadtp, threadtl, threadtb; in main()
261 DPRINTF(stderr, "Main Thread: start %d TF thread\n", cpus - 1); in main()
262 for (i = 0; i < cpus - 1; i++) { in main()
315 for (i = 2; i < cpus - 1; i++) { in main()
Dpitest-4.c52 int cpus; variable
154 DPRINTF(stdout, "# COLUMNS %d Time TL TP ", 2 + cpus); in thread_sample()
155 for (i = 0; i < (cpus - 1); i++) in thread_sample()
163 for (i = 0; i < cpus + 1; i++) in thread_sample()
239 cpus = sysconf(_SC_NPROCESSORS_ONLN); in main()
242 pthread_t threads[cpus - 1]; in main()
269 DPRINTF(stderr, "Main Thread: Creating %d TF threads\n", cpus - 1); in main()
270 for (i = 0; i < cpus - 1; i++) { in main()
326 for (i = 2; i < cpus - 1; i++) { in main()
Dpitest-6.c49 int cpus; variable
176 DPRINTF(stdout, "# COLUMNS %d Time TP TL ", 2 + cpus); in thread_sample()
177 for (i = 0; i < (cpus - 1); i++) in thread_sample()
186 for (i = 0; i < cpus + 1; i++) in thread_sample()
232 cpus = sysconf(_SC_NPROCESSORS_ONLN); in main()
235 pthread_t threads[cpus - 1], threadsample, threadtp, threadtl, threadtb; in main()
260 DPRINTF(stderr, "Main Thread: Creating %d TF threads\n", cpus - 1); in main()
261 for (i = 0; i < cpus - 1; i++) { in main()
316 for (i = 2; i < cpus - 1; i++) { in main()
Dpitest-2.c51 int cpus; variable
177 DPRINTF(stdout, "# COLUMNS %d Time TL TP1 TP2 ", 3 + cpus); in thread_sample()
178 for (i = 0; i < (cpus - 1); i++) in thread_sample()
186 for (i = 0; i < cpus + 2; i++) in thread_sample()
258 cpus = sysconf(_SC_NPROCESSORS_ONLN); in main()
261 pthread_t threads[cpus - 1]; in main()
287 DPRINTF(stderr, "Main Thread: Creating %d TF threads \n", cpus - 1); in main()
288 for (i = 0; i < cpus - 1; i++) { in main()
349 for (i = 2; i < cpus - 1; i++) { in main()
Dpitest-3.c51 int cpus; variable
186 DPRINTF(stdout, "# COLUMNS %d Time TL TP1 TP2 ", 3 + cpus); in thread_sample()
188 for (i = 0; i < (cpus - 1); i++) in thread_sample()
197 for (i = 0; i < cpus + 2; i++) in thread_sample()
269 cpus = sysconf(_SC_NPROCESSORS_ONLN); in main()
272 pthread_t threads[cpus - 1]; in main()
299 DPRINTF(stderr, "Main Thread: Creating %d TF threads\n", cpus - 1); in main()
300 for (i = 0; i < cpus - 1; i++) { in main()
361 for (i = 2; i < cpus - 1; i++) { in main()
/external/ltp/testcases/kernel/controllers/cpuset/cpuset_load_balance_test/
Dcpuset_sched_domains_check.c90 if (cpus[cpu].sched_domain != NULL) { in check_sched_domains()
94 cpus[cpu]. in check_sched_domains()
105 if (!bitmask_equal(domains[i], cpus[cpu].sched_domain)) { in check_sched_domains()
109 cpus[cpu].sched_domain); in check_sched_domains()
121 if (cpus[i].sched_domain) { in check_sched_domains()
/external/ltp/testcases/kernel/hotplug/cpu_hotplug/tools/
Dcpuhotplug_report_proc_interrupts29 my @cpus;
36 if (! @cpus) {
37 @cpus = split /\s+/, $line;
42 foreach my $cpu (@cpus) {
/external/linux-kselftest/tools/testing/selftests/cpufreq/
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
/external/linux-kselftest/tools/testing/selftests/net/
Dreuseport_bpf_cpu.c233 int *rcv_fd, cpus; in main() local
235 cpus = sysconf(_SC_NPROCESSORS_ONLN); in main()
236 if (cpus <= 0) in main()
239 rcv_fd = calloc(cpus, sizeof(int)); in main()
244 test(rcv_fd, cpus, AF_INET, SOCK_DGRAM); in main()
247 test(rcv_fd, cpus, AF_INET6, SOCK_DGRAM); in main()
250 test(rcv_fd, cpus, AF_INET, SOCK_STREAM); in main()
253 test(rcv_fd, cpus, AF_INET6, SOCK_STREAM); in main()
/external/bcc/src/cc/
Dcommon.cc26 std::vector<int> cpus; in read_cpu_range() local
32 cpus.push_back(std::stoi(cpu_range)); in read_cpu_range()
38 cpus.push_back(i); in read_cpu_range()
41 return cpus; in read_cpu_range()
/external/linux-kselftest/tools/testing/selftests/rcutorture/bin/
Dkvm.sh50 cpus=0
102 --cpus)
103 checkarg --cpus "(number)" "$#" "$2" '^[0-9]*$' '^--'
104 cpus=$2
240 awk < $T/cfgcpu.sort > $T/cfgcpu.pack -v ncpus=$cpus '
327 -v ncpus=$cpus \
/external/bcc/src/python/bcc/
Dutils.py22 cpus = []
28 cpus.append(int(cpu_range))
32 cpus.extend(range(start, end+1))
33 return cpus

12345678910>>...13