Lines Matching defs:task

174  * Opt the given task into or out of the telemetry stream.
184 telemetry_task_ctl(task_t task, uint32_t reasons, int enable_disable)
186 task_lock(task);
187 telemetry_task_ctl_locked(task, reasons, enable_disable);
188 task_unlock(task);
192 telemetry_task_ctl_locked(task_t task, uint32_t reasons, int enable_disable)
198 task_lock_assert_owned(task);
200 origflags = task->t_flags;
203 task->t_flags |= reasons;
207 printf("%s: telemetry OFF -> ON (%d active)\n", proc_name_address(task->bsd_info), telemetry_active_tasks);
211 task->t_flags &= ~reasons;
212 if (((origflags & TF_TELEMETRY) != 0) && ((task->t_flags & TF_TELEMETRY) == 0)) {
214 * If this task went from having at least one telemetry bit to having none,
215 * the net change was to disable telemetry for the task.
219 printf("%s: telemetry ON -> OFF (%d active)\n", proc_name_address(task->bsd_info), telemetry_active_tasks);
230 * task->t_flags & TF_TELEMETRY: This task is opted in.
239 if ((telemetry_active_tasks > 0) && ((thread->task->t_flags & TF_TELEMETRY) != 0)) {
330 task_t task;
348 task = thread->task;
349 if ((task == TASK_NULL) || (task == kernel_task))
355 p = get_bsdtask_info(task);
382 vm_shared_region_t sr = vm_shared_region_get(task);
395 * Retrieve the array of UUID's��for binaries used by this task.
402 if (task_has_64BitAddr(task)) {
404 if (copyin(task->all_image_info_addr, (char *)&task_image_infos, sizeof(task_image_infos)) == 0) {
410 if (copyin(task->all_image_info_addr, (char *)&task_image_infos, sizeof(task_image_infos)) == 0) {
419 * for this task.
433 uint32_t uuid_info_size = (uint32_t)(task_has_64BitAddr(thread->task) ? sizeof(struct user64_dyld_uuid_info) : sizeof(struct user32_dyld_uuid_info));
444 * It may be nonresident, in which case just fix up nloadinfos to 0 in the task snapshot.
462 uint64_t dq_serialno_offset = get_dispatchqueue_serialno_offset_from_proc(task->bsd_info);
463 if ((copyin(dqkeyaddr, (char *)&dqaddr, (task_has_64BitAddr(task) ? 8 : 4)) == 0) &&
466 if (copyin(dqserialnumaddr, (char *)&dqserialnum, (task_has_64BitAddr(task) ? 8 : 4)) == 0) {
527 tsnap->user_time_in_terminated_threads = task->total_user_time;
528 tsnap->system_time_in_terminated_threads = task->total_system_time;
529 tsnap->suspend_count = task->suspend_count;
530 tsnap->task_size = pmap_resident_count(task->map->pmap);
531 tsnap->faults = task->faults;
532 tsnap->pageins = task->pageins;
533 tsnap->cow_faults = task->cow_faults;
544 if (task->t_flags & TF_TELEMETRY) {
548 if (task->effective_policy.darwinbg == 1) {
552 proc_get_darwinbgstate(task, &tmp);
554 if (task->requested_policy.t_role == TASK_FOREGROUND_APPLICATION) {
566 tsnap->latency_qos = task_grab_latency_qos(task);
569 if (task_has_64BitAddr(thread->task)) {
581 * Directly after the task snapshot, place the array of UUID's corresponding to the binaries
582 * used by this task.
605 * After the task snapshot & list of binary UUIDs, we place a thread snapshot.
667 if (task_has_64BitAddr(task)) {
968 * possible that at this point, the task/proc is not initialized.