/external/ltp/testcases/kernel/controllers/cpuset/cpuset_hierarchy_test/ |
D | cpuset_hierarchy_test.sh | 48 cpuset_log "father cpus $(cat "$CPUSET/father/cpus")" 49 cpuset_log "child cpus $(cat "$CPUSET/father/child/cpus")" 51 test -z "$(cat "$CPUSET/father/cpus")" || return 1 52 test -z "$(cat "$CPUSET/father/child/cpus")" || return 1 60 cpuset_log "father cpus $(cat "$CPUSET/father/cpus")" 61 cpuset_log "child cpus $(cat "$CPUSET/father/child/cpus")" 63 test -z "$(cat "$CPUSET/father/cpus")" || return 1 64 test -z "$(cat "$CPUSET/father/child/cpus")" || return 1 72 cpuset_log "father cpus $(cat "$CPUSET/father/cpus")" 73 cpuset_log "child cpus $(cat "$CPUSET/father/child/cpus")" [all …]
|
/external/autotest/client/tests/tsc/src/ |
D | checktsc.c | 72 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/ |
D | cpuinfo.c | 24 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 …]
|
D | libcpuset.c | 70 struct bitmask *cpus; member 623 if ((cp->cpus = bitmask_alloc(nbits)) == NULL) in cpuset_alloc() 632 if (cp && cp->cpus) in cpuset_alloc() 633 bitmask_free(cp->cpus); in cpuset_alloc() 645 if (cp->cpus) in cpuset_free() 646 bitmask_free(cp->cpus); in cpuset_free() 669 int cpuset_setcpus(struct cpuset *cp, const struct bitmask *cpus) in cpuset_setcpus() argument 671 if (cp->cpus) in cpuset_setcpus() 672 bitmask_free(cp->cpus); in cpuset_setcpus() 673 cp->cpus = bitmask_alloc(bitmask_nbits(cpus)); in cpuset_setcpus() [all …]
|
/external/autotest/client/tests/monotonic_time/src/ |
D | threads.c | 21 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()
|
D | time_test.c | 231 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()
|
D | cpuset.c | 16 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()
|
D | cpuset.h | 13 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/ |
D | cpuset_regression_test.sh | 64 cpus=cpuset.cpus 67 cpus=cpus 133 echo 0-1 > ${root_cpuset_dir}/testdir/${cpus} 136 "${root_cpuset_dir}/testdir/${cpus}' failed" 139 local cpus_value=$(cat ${root_cpuset_dir}/testdir/${cpus}) 141 tst_brkm TFAIL "${cpus} is '${cpus_value}', expected '0-1'"
|
/external/ltp/testcases/kernel/controllers/cpuset/cpuset_base_ops_test/ |
D | cpuset_base_ops_testset.sh | 106 while read cpus result 108 base_op_test "$CPUSET/1/cpus" "$cpus" "$result" 200 local cpus=$1 224 if [ "$cpus" != "NULL" ]; then 225 echo $cpus > "$CPUSET/sub_cpuset/cpus" 239 …tst_resm TFAIL "Attaching Task Test failed!! cpus - \"$cpus\", mems - \"$mems\", Expect - \"$expec… 255 while read cpus mems expect 257 attach_task_test "$cpus" "$mems" "$expect" 268 for filename in cpus mems memory_pressure
|
/external/ltp/testcases/kernel/controllers/cpuset/cpuset_hotplug_test/ |
D | cpuset_hotplug_test.sh | 116 local cpus="$2" 132 cpuset_set "$path" "$cpus" "$mems_all" "0" 2> $CPUSET_TMP/stderr 158 cpus="`cat $path/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/ |
D | cpistat | 31 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/fio/os/ |
D | os-solaris.h | 111 processorid_t *cpus; in fio_cpu_isset() local 114 cpus = malloc(sizeof(*cpus) * max_cpus); in fio_cpu_isset() 116 if (pset_info(*mask, NULL, &num_cpus, cpus) < 0) { in fio_cpu_isset() 117 free(cpus); in fio_cpu_isset() 123 if (cpus[i] == cpu) { in fio_cpu_isset() 129 free(cpus); in fio_cpu_isset()
|
/external/chromium-trace/catapult/telemetry/telemetry/internal/platform/power_monitor/ |
D | sysfs_power_monitor_unittest.py | 240 cpus = ["cpu%d" % cpu for cpu in range(4)] 241 expected_result = dict(zip(cpus, [expected_cstate_dict]*2)) 246 sysfsmon._cpus = cpus 275 cpus = ["cpu%d" % cpu for cpu in range(2)] 276 expected_result = dict(zip(cpus, [expected_cstate_dict]*len(cpus))) 281 sysfsmon._cpus = cpus
|
/external/ltp/testcases/open_posix_testsuite/functional/threads/pi_test/ |
D | pitest-6.c | 49 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() 243 cpus = sysconf(_SC_NPROCESSORS_ONLN); in main() 261 DPRINTF(stderr, "Main Thread: Creating %d TF threads\n", cpus - 1); in main() 262 for (i = 0; i < cpus - 1; i++) { in main() 317 for (i = 2; i < cpus - 1; i++) { in main()
|
D | pitest-1.c | 49 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() 235 pthread_t threads[cpus - 1], threadsample, threadtp, threadtl, threadtb; in main() 242 cpus = sysconf(_SC_NPROCESSORS_ONLN); 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()
|
D | pitest-5.c | 50 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() 259 pthread_t threads[cpus - 1], threadsample, threadtp, threadtl, threadtb; in main() 266 cpus = sysconf(_SC_NPROCESSORS_ONLN); 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()
|
D | pitest-4.c | 52 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() 241 pthread_t threads[cpus - 1]; in main() 250 cpus = sysconf(_SC_NPROCESSORS_ONLN); 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()
|
D | pitest-2.c | 51 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() 260 pthread_t threads[cpus - 1]; in main() 268 cpus = sysconf(_SC_NPROCESSORS_ONLN); 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()
|
D | pitest-3.c | 51 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() 271 pthread_t threads[cpus - 1]; in main() 280 cpus = sysconf(_SC_NPROCESSORS_ONLN); 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/ |
D | cpuset_sched_domains_check.c | 90 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/ |
D | cpuhotplug_report_proc_interrupts | 29 my @cpus; 36 if (! @cpus) { 37 @cpus = split /\s+/, $line; 42 foreach my $cpu (@cpus) {
|
/external/linux-kselftest/tools/testing/selftests/net/ |
D | reuseport_bpf_cpu.c | 232 int *rcv_fd, cpus; in main() local 234 cpus = sysconf(_SC_NPROCESSORS_ONLN); in main() 235 if (cpus <= 0) in main() 238 rcv_fd = calloc(cpus, sizeof(int)); in main() 243 test(rcv_fd, cpus, AF_INET, SOCK_DGRAM); in main() 246 test(rcv_fd, cpus, AF_INET6, SOCK_DGRAM); in main() 249 test(rcv_fd, cpus, AF_INET, SOCK_STREAM); in main() 252 test(rcv_fd, cpus, AF_INET6, SOCK_STREAM); in main()
|
/external/autotest/client/site_tests/power_CPUFreq/ |
D | power_CPUFreq.py | 82 cpus = [cpufreq(dir) for dir in dirs] 83 cpu0 = cpus[0] 91 for cpu in cpus: 104 for cpu in cpus: 106 for cpu in cpus: 111 for cpu in cpus:
|
/external/linux-kselftest/tools/testing/selftests/rcutorture/bin/ |
D | kvm.sh | 49 cpus=0 99 --cpus) 100 checkarg --cpus "(number)" "$#" "$2" '^[0-9]*$' '^--' 101 cpus=$2 220 awk < $T/cfgcpu.sort > $T/cfgcpu.pack -v ncpus=$cpus ' 308 -v ncpus=$cpus \
|