/external/autotest/client/site_tests/power_CPUIdle/ |
power_CPUIdle.py | 17 all_cpus = cpus() 23 # sleep for some time to allow the CPUs to drop into idle states 58 class cpus(object): class in inherits:object
|
/prebuilts/go/darwin-x86/test/bench/garbage/ |
tree2.go | 25 cpus = flag.Int("cpus", 1, "number of cpus to use") 75 runtime.GOMAXPROCS(*cpus) 24 cpus = flag.Int("cpus", 1, "number of cpus to use") var
|
/prebuilts/go/linux-x86/test/bench/garbage/ |
tree2.go | 25 cpus = flag.Int("cpus", 1, "number of cpus to use") 75 runtime.GOMAXPROCS(*cpus) 24 cpus = flag.Int("cpus", 1, "number of cpus to use") var
|
/external/autotest/client/profilers/cpistat/ |
cpistat | 22 parser.add_option('-c', '--cpulist', help='CPUs to monitor', 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/autotest/client/tests/monotonic_time/src/ |
threads.c | 21 cpu_set_t cpus; member in struct:thread 31 * Helper function to run a thread on a specific set of CPUs. 38 if (sched_setaffinity(0, sizeof thread->cpus, &thread->cpus) < 0) 49 * the CPUs specified by cpus. 52 int create_per_cpu_threads(cpu_set_t *cpus, thread_func_t func, void *arg) 59 if (!CPU_ISSET(cpu, cpus)) 67 CPU_ZERO(&thread->cpus); 68 CPU_SET(cpu, &thread->cpus); [all...] |
time_test.c | 38 { "cpus", required_argument, 0, 'c' }, 55 "check time sources for monotonicity across multiple CPUs\n" 56 " -c,--cpus set of cpus to test (default: all)\n" 231 int run_test(cpu_set_t *cpus, long duration, struct test_info *test) 256 ncpus = count_cpus(cpus); 257 nthreads = create_per_cpu_threads(cpus, test_loop, test); 269 INFO("running %s test on %d cpus for %ld seconds", 272 INFO("running %s test on %d cpus", test->name, ncpus); 309 cpu_set_t cpus; local [all...] |
/bionic/tests/ |
pty_test.cpp | 84 cpu_set_t cpus; local 85 ASSERT_EQ(0, sched_getaffinity(0, sizeof(cpu_set_t), &cpus)); 86 CPU_CLR(arg->main_cpu_id, &cpus); 87 ASSERT_EQ(0, sched_setaffinity(0, sizeof(cpu_set_t), &cpus)); 109 cpu_set_t cpus; local 110 ASSERT_EQ(0, sched_getaffinity(0, sizeof(cpu_set_t), &cpus)); 111 if (CPU_COUNT(&cpus) < 2) { 126 // 2. Make master thread and slave thread running on different cpus: 127 // master thread uses first available cpu, and slave thread uses other cpus. 131 if (CPU_ISSET(i, &cpus)) { [all...] |
sys_ptrace_test.cpp | 214 cpu_set_t cpus; local 215 CPU_ZERO(&cpus); 216 CPU_SET(cpu, &cpus); 217 if (sched_setaffinity(0, sizeof cpus, &cpus) == -1) {
|
/external/linux-kselftest/tools/testing/selftests/net/ |
reuseport_bpf_cpu.c | 232 int *rcv_fd, cpus; local 234 cpus = sysconf(_SC_NPROCESSORS_ONLN); 235 if (cpus <= 0) 236 error(1, errno, "failed counting cpus"); 238 rcv_fd = calloc(cpus, sizeof(int)); 243 test(rcv_fd, cpus, AF_INET, SOCK_DGRAM); 246 test(rcv_fd, cpus, AF_INET6, SOCK_DGRAM); 249 test(rcv_fd, cpus, AF_INET, SOCK_STREAM); 252 test(rcv_fd, cpus, AF_INET6, SOCK_STREAM);
|
/external/autotest/client/tests/tsc/src/ |
checktsc.c | 25 { "cpus", required_argument, 0, 'c' }, 43 printf("check TSC synchronization between CPUs\n"); 44 printf(" -c,--cpus set of cpus to test (default: all)\n"); 72 int parse_cpu_set(const char *s, cpu_set_t *cpus) 74 CPU_ZERO(cpus); 114 CPU_SET(cpu, cpus); 179 cpu_set_t cpus; local 181 CPU_ZERO(&cpus); 182 CPU_SET(cpu, &cpus); 320 cpu_set_t cpus; local [all...] |
/external/fio/os/ |
os-solaris.h | 110 processorid_t *cpus; local 113 cpus = malloc(sizeof(*cpus) * max_cpus); 115 if (pset_info(*mask, NULL, &num_cpus, cpus) < 0) { 116 free(cpus); 122 if (cpus[i] == cpu) { 128 free(cpus);
|
/external/ltp/testcases/kernel/controllers/cpuset/cpuset_lib/ |
cpuinfo.c | 24 struct cpuinfo *cpus; variable in typeref:struct:cpuinfo 37 /* get the number of cpus including offline cpus */ 44 if (cpus != NULL) { 45 free(cpus); 46 cpus = NULL; 49 /* allocate the memory space for cpus */ 50 cpus = malloc(sizeof(*cpus) * ncpus); 51 if (cpus == NULL [all...] |
/external/ltp/testcases/open_posix_testsuite/functional/threads/pi_test/ |
pitest-1.c | 10 * one. TFs are used to keep busy these CPUs, which have priority 3. A 49 int cpus; variable 177 DPRINTF(stdout, "# COLUMNS %d Time TL TP ", 2 + cpus); 178 for (i = 0; i < (cpus - 1); i++) 186 for (i = 0; i < cpus + 1; i++) 233 cpus = sysconf(_SC_NPROCESSORS_ONLN); 236 pthread_t threads[cpus - 1], threadsample, threadtp, threadtl, threadtb; 261 DPRINTF(stderr, "Main Thread: start %d TF thread\n", cpus - 1); 262 for (i = 0; i < cpus - 1; i++) { 315 for (i = 2; i < cpus - 1; i++) [all...] |
pitest-2.c | 11 * one. TFs are used to keep busy these CPUs, which have priority 3. A 51 int cpus; variable 177 DPRINTF(stdout, "# COLUMNS %d Time TL TP1 TP2 ", 3 + cpus); 178 for (i = 0; i < (cpus - 1); i++) 186 for (i = 0; i < cpus + 2; i++) 258 cpus = sysconf(_SC_NPROCESSORS_ONLN); 261 pthread_t threads[cpus - 1]; 287 DPRINTF(stderr, "Main Thread: Creating %d TF threads \n", cpus - 1); 288 for (i = 0; i < cpus - 1; i++) { 349 for (i = 2; i < cpus - 1; i++) [all...] |
pitest-3.c | 11 * one. TFs are used to keep busy these CPUs, which have priority 3. A 51 int cpus; variable 186 DPRINTF(stdout, "# COLUMNS %d Time TL TP1 TP2 ", 3 + cpus); 188 for (i = 0; i < (cpus - 1); i++) 197 for (i = 0; i < cpus + 2; i++) 269 cpus = sysconf(_SC_NPROCESSORS_ONLN); 272 pthread_t threads[cpus - 1]; 299 DPRINTF(stderr, "Main Thread: Creating %d TF threads\n", cpus - 1); 300 for (i = 0; i < cpus - 1; i++) { 361 for (i = 2; i < cpus - 1; i++) [all...] |
pitest-4.c | 11 * one. TFs are used to keep busy these CPUs, which have priority 4. A 52 int cpus; variable 154 DPRINTF(stdout, "# COLUMNS %d Time TL TP ", 2 + cpus); 155 for (i = 0; i < (cpus - 1); i++) 163 for (i = 0; i < cpus + 1; i++) 239 cpus = sysconf(_SC_NPROCESSORS_ONLN); 242 pthread_t threads[cpus - 1]; 269 DPRINTF(stderr, "Main Thread: Creating %d TF threads\n", cpus - 1); 270 for (i = 0; i < cpus - 1; i++) { 326 for (i = 2; i < cpus - 1; i++) [all...] |
pitest-5.c | 11 * one. TFs are used to keep busy these CPUs, which have priority 3. A 50 int cpus; variable 194 DPRINTF(stdout, "# COLUMNS %d Time TL TP ", 2 + cpus); 196 for (i = 0; i < (cpus - 1); i++) 206 for (i = 0; i < cpus + 1; i++) 257 cpus = sysconf(_SC_NPROCESSORS_ONLN); 260 pthread_t threads[cpus - 1], threadsample, threadtp, threadtl, threadtb; 283 DPRINTF(stderr, "Main Thread: Creating %d TF threads\n", cpus - 1); 284 for (i = 0; i < cpus - 1; i++) { 333 for (i = 2; i < cpus - 1; i++) [all...] |
pitest-6.c | 11 * one. TFs are used to keep busy these CPUs, which have priority 3. A 49 int cpus; variable 176 DPRINTF(stdout, "# COLUMNS %d Time TP TL ", 2 + cpus); 177 for (i = 0; i < (cpus - 1); i++) 186 for (i = 0; i < cpus + 1; i++) 232 cpus = sysconf(_SC_NPROCESSORS_ONLN); 235 pthread_t threads[cpus - 1], threadsample, threadtp, threadtl, threadtb; 260 DPRINTF(stderr, "Main Thread: Creating %d TF threads\n", cpus - 1); 261 for (i = 0; i < cpus - 1; i++) { 316 for (i = 2; i < cpus - 1; i++) [all...] |
/system/extras/simpleperf/ |
event_selection_set.cpp | 324 static bool CheckIfCpusOnline(const std::vector<int>& cpus) { 326 for (const auto& cpu : cpus) { 388 std::vector<int> cpus = on_cpus; local 389 if (!cpus.empty()) { 390 // cpus = {-1} means open an event file for all cpus. 391 if (!(cpus.size() == 1 && cpus[0] == -1) && !CheckIfCpusOnline(cpus)) { 395 cpus = GetOnlineCpus() [all...] |
/external/dtc/ |
livetree.c | 596 struct node *cpus, *bootcpu; local 599 cpus = get_node_by_path(tree, "/cpus"); 600 if (!cpus) 604 bootcpu = cpus->children;
|
/external/ltp/testcases/kernel/mem/lib/ |
mem.c | 694 static void gather_node_cpus(char *cpus, long nd) 720 strcat(cpus, buf); 724 cpus[strlen(cpus) - 1] = '\0'; 786 char cpus[BUFSIZ] = ""; local 791 gather_node_cpus(cpus, nd); 793 * If the 'nd' node doesn't contain any CPUs, 795 * the value of cpuset.cpus. 797 if (strlen(cpus) != 0) { 798 write_cpuset_files(CPATH_NEW, "cpus", cpus) [all...] |
/external/fio/ |
server.h | 141 uint32_t cpus; member in struct:cmd_probe_reply_pdu
|
/frameworks/base/core/jni/ |
android_util_Process.cpp | 315 static void parse_cpuset_cpus(char *cpus, cpu_set_t *cpu_set) { 317 char *cpu_range = strtok(cpus, ","); 336 ALOGE("Failed to match cpus"); 343 * Stores the CPUs assigned to the cpuset corresponding to the 355 filename = "/dev/cpuset/background/cpus"; 361 filename = "/dev/cpuset/foreground/cpus"; 364 filename = "/dev/cpuset/top-app/cpus"; 374 // Parse cpus string 417 jintArray cpus; local 425 cpus = env->NewIntArray(num_cpus) [all...] |
/external/blktrace/btreplay/ |
btreplay.c | 142 static int cpus_to_use = -1; // Number of CPUs to use 145 static int ncpus = 0; // Number of CPUs in the system 505 cpu_set_t cpus; local 507 if (sched_getaffinity(getpid(), sizeof(cpus), &cpus)) { 516 for (ncpus = 0; ncpus < CPU_SETSIZE && CPU_ISSET(ncpus, &cpus); ncpus++) 519 fatal(NULL, ERR_SYSCALL, "Insufficient number of CPUs\n"); 530 cpu_set_t cpus; local 534 CPU_ZERO(&cpus); 535 CPU_SET(tip->cpu, &cpus); [all...] |
/external/blktrace/ |
blkparse.c | 69 struct per_cpu_info *cpus; member in struct:per_dev_info 323 struct per_cpu_info *cpus = pdi->cpus; local 330 cpus = realloc(cpus, size); 331 if (!cpus) { 338 new_start = (char *)cpus + (ncpus * sizeof(struct per_cpu_info)); 343 pdi->cpus = cpus; 346 struct per_cpu_info *pci = &pdi->cpus[new_count] [all...] |