| /xnu-11215/tests/sched/ |
| H A D | clutch_runqueue.c | 84 test_thread_t threads[num_threads]; variable 108 enqueue_thread(threads[bucket - 1]); 126 enqueue_thread(threads[bucket - 1]); 147 test_thread_t threads[num_tgs]; variable 262 test_thread_t threads[num_threads]; variable 272 enqueue_threads_arr(num_threads, threads); 289 enqueue_thread(threads[bucket - 1]); 317 enqueue_thread(threads[bucket - 1]); 337 enqueue_thread(threads[bucket - 1]); 356 set_thread_current(threads[0]); [all …]
|
| H A D | thread_group_flags.c | 126 pthread_t *threads = (pthread_t *)malloc(sizeof(pthread_t) * num_threads); in start_threads() local 134 ret = pthread_create(&threads[i], &attr, func, (void *)&datas[i]); in start_threads() 137 return threads; in start_threads() 141 start_test(ktrace_session_t session, pthread_t *threads, int num_threads) in start_test() argument 146 int ret = pthread_join(threads[i], NULL); in start_test() 307 __block pthread_t *threads = start_threads(join_workload_fn, datas, num_workload_ids); variable 308 start_test(session, threads, num_workload_ids); 409 __block pthread_t *threads = start_threads(join_leave_pid_based, datas, num_threads); variable 410 start_test(session, threads, num_threads);
|
| H A D | thread_group_fairness.c | 131 start_threads(pthread_t *threads, struct thread_data *thread_datas, work_interval_t *handle, uint32… in start_threads() argument 137 ret = pthread_create(&threads[i], NULL, spin_thread_fn, &thread_datas[i]); in start_threads() 143 snapshot_user_time_usec(pthread_t *threads) in snapshot_user_time_usec() argument 149 mach_port_t thread_port = pthread_mach_thread_np(threads[i]); in snapshot_user_time_usec()
|
| /xnu-11215/tests/ |
| H A D | task_vm_info_decompressions.c | 120 create_threads(int nthreads, pthread_t *threads, struct thread_args *targs) in create_threads() argument 130 err = pthread_create(&threads[i], &attr, worker_thread_function, (void*)&targs[i]); in create_threads() 134 return threads; in create_threads() 138 join_threads(int nthreads, pthread_t *threads) in join_threads() argument 144 err = pthread_join(threads[i], NULL); in join_threads() 160 pthread_t *threads; variable 194 threads = malloc(sizeof(pthread_t) * (size_t)ncpu); 200 create_threads(ncpu, threads, targs); 232 join_threads(ncpu, threads); 233 free(threads);
|
| H A D | turnstiles_test.c | 339 pthread_t threads[5] = {}; in test4() local 360 pthread_create(&threads[0], NULL, chain_locking, (void *)&data[0]); in test4() 370 pthread_create(&threads[1], NULL, chain_locking, (void *)&data[1]); in test4() 380 pthread_create(&threads[2], NULL, chain_locking, (void *)&data[2]); in test4() 390 pthread_create(&threads[3], NULL, chain_locking, (void *)&data[3]); in test4() 400 pthread_create(&threads[4], NULL, chain_locking, (void *)&data[4]); in test4() 412 pthread_t threads[5] = {}; in test5() local 431 pthread_create(&threads[0], NULL, chain_locking, (void *)&data[0]); in test5() 441 pthread_create(&threads[1], NULL, chain_locking, (void *)&data[1]); in test5() 451 pthread_create(&threads[2], NULL, chain_locking, (void *)&data[2]); in test5() [all …]
|
| H A D | arm_matrix.c | 222 struct test_thread *threads = calloc(nthreads, sizeof(threads[0])); in test_on_each_cpu() local 224 threads[i].thread_fn = thread_fn; in test_on_each_cpu() 225 threads[i].cpuid = i % ncpu; in test_on_each_cpu() 226 threads[i].thread_id = i; in test_on_each_cpu() 227 threads[i].ops = ops; in test_on_each_cpu() 229 int err = pthread_create(&threads[i].thread, NULL, test_thread_shim, &threads[i]); in test_on_each_cpu() 235 int err = pthread_join(threads[i].thread, &thread_ret_ptr); in test_on_each_cpu() 246 free(threads); in test_on_each_cpu()
|
| H A D | kernel_inspection.c | 50 thread_act_array_t threads; in attempt_kernel_inspection() local 69 T_EXPECT_MACH_SUCCESS(task_threads(task, &threads, &thcnt), "task_threads"); in attempt_kernel_inspection() 76 kr = thread_info(threads[i], THREAD_BASIC_INFO, in attempt_kernel_inspection() 93 …kr = thread_get_exception_ports_info(threads[i], EXC_MASK_ALL, masks, &msk_count, ports_info, beha… in attempt_kernel_inspection() 98 kr = thread_get_mach_voucher(threads[i], 0, &voucher); in attempt_kernel_inspection() 101 (void)mach_port_deallocate(mach_task_self(), threads[i]); in attempt_kernel_inspection() 104 (mach_vm_address_t)(uintptr_t)threads, in attempt_kernel_inspection() 105 thcnt * sizeof(*threads)); in attempt_kernel_inspection()
|
| H A D | stackshot_idle_25570396.m | 2 * that idle and active threads can be appropriately identified. 23 #define NUMTHREADS (NUMENQUEUES + 2) // total number of threads (including numenqueues) 146 * shared semaphore. This should spin up plenty of threads! */ 163 sleep(1); // give worker threads enough time to block 173 // Give enough time for worker threads to go idle again 193 /* Take stackshot, count the number of idle and nonidle threads the stackshot records. 194 * Where this is called, there should be NUMENQUEUES idle threads (thanks to warm_up_threadpool) 195 * and 2 nonidle threads (the main thread, and the spinning pthread). 219 * no new idle threads appear in the delta, and make sure that the delta shot isn't 220 * ignoring the worker threads that have become active. [all …]
|
| H A D | tcp_input_outputopts_uaf_56155583.c | 68 pthread_t threads[20]; variable 81 if (pthread_create(&threads[nthreads++], NULL, setopt_thread, &s)) { 87 if (pthread_create(&threads[nthreads++], NULL, connect_thread, &sin6)) { 100 pthread_join(threads[n], NULL);
|
| H A D | perf_vmfault.c | 81 static void setup_and_run_test(int test, int threads); 302 pthread_t* threads; in execute_threads() local 312 threads = (pthread_t *)malloc(sizeof(*threads) * (size_t)num_threads); in execute_threads() 316 T_QUIET; T_ASSERT_POSIX_SUCCESS(pthread_create(&threads[thread_index], NULL, in execute_threads() 339 T_QUIET; T_ASSERT_POSIX_SUCCESS(pthread_join(threads[thread_index], &thread_retval_ptr), in execute_threads() 343 free(threads); in execute_threads() 384 setup_and_run_test(int fault_type, int threads) in setup_and_run_test() argument 392 num_threads = threads; in setup_and_run_test() 395 if (threads == 1) { in setup_and_run_test()
|
| H A D | monotonic_core.c | 178 pthread_t *threads = calloc((unsigned long)ncpus, sizeof(*threads)); variable 180 T_QUIET; T_ASSERT_NOTNULL(threads, "allocated space for threads"); 189 T_QUIET; T_ASSERT_POSIX_ZERO(pthread_create(&threads[i], NULL,
|
| H A D | perf_exit.c | 35 int threads; member 85 s = create_stat(test_cases[consumer_i].wired_mem, test_cases[consumer_i].threads); 120 s = create_stat(test_cases[consumer_i].wired_mem, test_cases[consumer_i].threads); 161 snprintf(nthreads_buf, 32, "%d", test_cases[producer_i].threads);
|
| H A D | hw_breakpoint_step_arm64.c | 182 thread_array_t threads = NULL; variable 184 kr = task_threads(task, &threads, &thread_count); 187 step_thread(task, threads[0]); 192 step_thread(task, threads[0]);
|
| /xnu-11215/doc/scheduler/ |
| H A D | sched_clutch_edge.md | 7 …threads in the system to be tagged with a priority number and treating high priority threads as in… 9 …read level incentivizes creating more threads on the system. Also in the world of GCD and workqueu… 81 * **Clutch Bucket Group Blocked Time**: Maintains the amount of time no threads were runnable for t… 82 …s the amount of time threads were pending execution for this clutch bucket group. This value is re… 83 * **Clutch Bucket Group CPU Time**: Maintains the CPU time used by all threads of this clutch bucke… 99 …threads in a clutch bucket are inserted into the runqueue based on the `sched_pri`. The scheduler … 160 * Use the load value to calculate the priority shift values for all threads in the clutch bucket 228 …tracks the average execution latency of threads at a particular QoS. This value tracks the amount … 259 * (1) Find foreign runnnable threads in non-native cluster runqueues (sched_edge_foreign_runnable_t… 261 * (3) Check if foreign threads are running on the non-native clusters (sched_edge_foreign_running_t… [all …]
|
| /xnu-11215/libsyscall/wrappers/libproc/ |
| H A D | proc_listpidspath.c | 40 uint64_t *threads; member 75 info->threads = NULL; in check_init() 109 if (info->threads != NULL) { in check_free() 110 free(info->threads); in check_free() 413 if (info->threads == NULL) { in check_process_threads() 414 info->threads = malloc(info->thr_size); in check_process_threads() 416 info->threads = reallocf(info->threads, info->thr_size); in check_process_threads() 418 if (info->threads == NULL) { in check_process_threads() 423 buf_used = proc_pidinfo(pid, PROC_PIDLISTTHREADS, 0, info->threads, (int)info->thr_size); in check_process_threads() 440 uint64_t thr = info->threads[i]; in check_process_threads()
|
| /xnu-11215/tests/counter/ |
| H A D | counter.c | 140 pthread_t *threads; variable 144 threads = malloc(sizeof(pthread_t) * kNumThreads); 145 T_QUIET; T_ASSERT_NOTNULL(threads, "Out of memory"); 152 ret = pthread_create(&threads[i], &pthread_attr, background_scalable_counter_thread, (void*)(i)); 159 ret = pthread_join(threads[i], &exit_code); 169 free(threads);
|
| H A D | benchmark.c | 60 pthread_t* threads = NULL; in main() local 78 threads = malloc(sizeof(pthread_t) * globals.tg_args.n_threads); in main() 79 assert(threads); in main() 86 ret = pthread_create(threads + i, &pthread_attrs, writer, &globals); in main() 90 ret = pthread_join(threads[i], NULL); in main()
|
| /xnu-11215/tools/tests/execperf/ |
| H A D | run.c | 23 pthread_t *threads; in main() local 34 threads = (pthread_t *)calloc(threadcount, sizeof(pthread_t)); in main() 36 ret = pthread_create(&threads[i], NULL, work, (void *)(intptr_t)count); in main() 43 ret = pthread_join(threads[i], NULL); in main()
|
| /xnu-11215/tools/tests/perf_index/ |
| H A D | perf_index.c | 163 pthread_t* threads; in main() local 199 threads = (pthread_t*)malloc(sizeof(pthread_t) * args.num_threads); in main() 201 retval = pthread_create(&threads[thread_index], NULL, thread_setup, (void*)(long)thread_index); in main() 214 pthread_join(threads[thread_index], &thread_retval_ptr); in main() 226 free(threads); in main() 232 free(threads); in main()
|
| H A D | README | 3 pref_index type threads size [args] 4 where type is one of the test types explained below, threads is the number of 5 userland threads that should preform the task, size is the size of the task and 10 iperf will run the cpu workload on two threads with a total work load size of 11 100000000. Since the workload is distributed over 2 threads, on a perfectly 13 for the threads parameter. When finished running perf_index will write the 26 test_controller.py num_clients type threads size 27 The server will wait for num_client to connect. It will then pass type, threads,
|
| /xnu-11215/tools/lldbmacros/usertaskdebugging/ |
| H A D | userprocess.py | 134 self.threads = {} 137 for thval in IterateQueue(task.threads, 'thread *', 'task_threads'): 138 … self.threads[unsigned(thval.thread_id)] = UserThreadObject(thval, self.cputype, self.cpusubtype) 142 if th_id not in self.threads: 148 value = self.threads[th_id].getRegisterData(reg_num) 152 if th_id not in self.threads: 155 cur_thread = self.threads[th_id] 168 if th_id not in self.threads:
|
| /xnu-11215/tests/sched/sched_test_harness/ |
| H A D | sched_runqueue_harness.c | 140 enqueue_threads_arr(int num_threads, test_thread_t *threads) in enqueue_threads_arr() argument 143 enqueue_thread(threads[i]); in enqueue_threads_arr() 162 enqueue_threads_arr_rand_order(unsigned int random_seed, int num_threads, test_thread_t *threads) in enqueue_threads_arr_rand_order() argument 166 scratch_space[i] = threads[i]; in enqueue_threads_arr_rand_order() 223 dequeue_threads_expect_ordered_arr(int num_threads, test_thread_t *threads) in dequeue_threads_expect_ordered_arr() argument 227 bool result = dequeue_thread_expect(threads[i]); in dequeue_threads_expect_ordered_arr()
|
| H A D | sched_runqueue_harness.h | 29 extern void enqueue_threads_arr(int num_threads, test_thread_t *threads); 31 … enqueue_threads_arr_rand_order(unsigned int random_seed, int num_threads, test_thread_t *threads); 34 … int dequeue_threads_expect_ordered_arr(int num_threads, test_thread_t *threads);
|
| /xnu-11215/tools/tests/perf_index/PerfIndex_COPS_Module/ |
| H A D | PITest.m | 103 self->threads = (pthread_t*)malloc(sizeof(pthread_t)*self->numThreads); 108 retval = pthread_create(&threads[thread_index], NULL, thread_setup, (__bridge void*)arg); 111 free(self->threads); 128 pthread_join(self->threads[thread_index], NULL); 135 free(self->threads);
|
| /xnu-11215/tests/vm/ |
| H A D | fault_throughput.c | 189 static uint64_t join_background_threads(test_globals_t *globals, pthread_t *threads); 214 pthread_t* threads = setup_test(globals, &args, kMemSize, args.verbose); in main() local 225 cpu_time_faulting_us = join_background_threads(globals, threads); in main() 526 pthread_t* threads = malloc(sizeof(pthread_t) * num_threads); in spawn_worker_threads() local 528 assert(threads); in spawn_worker_threads() 537 ret = pthread_create(threads + i, &pthread_attrs, faulting_thread, &faulting_thread_args[i]); in spawn_worker_threads() 542 return threads; in spawn_worker_threads() 557 join_background_threads(test_globals_t *globals, pthread_t *threads) in join_background_threads() argument 573 ret = pthread_join(threads[i], (void **)&cputime_spent_faulting); in join_background_threads() 577 free(threads); in join_background_threads()
|