kperf_state |= KPERF_TI_IDLE;
}
-#if !TARGET_OS_EMBEDDED
+#if !CONFIG_EMBEDDED
/* on desktop, if state is blank, leave not idle set */
if (kperf_state == 0) {
return (TH_IDLE << 16);
}
-#endif /* !TARGET_OS_EMBEDDED */
+#endif /* !CONFIG_EMBEDDED */
/* high two bytes are inverted mask, low two bytes are normal */
return (((~kperf_state & 0xffff) << 16) | (kperf_state & 0xffff));
BUF_INFO(PERF_TI_SCHEDSAMPLE | DBG_FUNC_START, (uintptr_t)thread_tid(thread));
- thsc->kpthsc_user_time = timer_grab(&(thread->user_timer));
- uint64_t system_time = timer_grab(&(thread->system_timer));
+ thsc->kpthsc_user_time = timer_grab(&thread->user_timer);
+ uint64_t system_time = timer_grab(&thread->system_timer);
if (thread->precise_user_kernel_time) {
thsc->kpthsc_system_time = system_time;
thsc->kpthsc_system_time = 0;
}
+ thsc->kpthsc_runnable_time = timer_grab(&thread->runnable_timer);
thsc->kpthsc_state = thread->state;
thsc->kpthsc_base_priority = thread->base_pri;
thsc->kpthsc_sched_priority = thread->sched_pri;
thsc->kpthsc_effective_qos = thread->effective_policy.thep_qos;
thsc->kpthsc_requested_qos = thread->requested_policy.thrp_qos;
- thsc->kpthsc_requested_qos_override = thread->requested_policy.thrp_qos_override;
+ thsc->kpthsc_requested_qos_override = MAX(thread->requested_policy.thrp_qos_override,
+ thread->requested_policy.thrp_qos_workq_override);
thsc->kpthsc_requested_qos_promote = thread->requested_policy.thrp_qos_promote;
thsc->kpthsc_requested_qos_ipc_override = thread->requested_policy.thrp_qos_ipc_override;
thsc->kpthsc_requested_qos_sync_ipc_override = thread->requested_policy.thrp_qos_sync_ipc_override;
| ((uint64_t)thsc->kpthsc_requested_qos_ipc_override << 55)
| ((uint64_t)thsc->kpthsc_requested_qos_sync_ipc_override << 52)
);
+ BUF_DATA(PERF_TI_SCHEDDATA_3, thsc->kpthsc_runnable_time);
#else
BUF_DATA(PERF_TI_SCHEDDATA1_32, UPPER_32(thsc->kpthsc_user_time),
LOWER_32(thsc->kpthsc_user_time),
| ((uint32_t)thsc->kpthsc_requested_qos_ipc_override << 23)
| ((uint32_t)thsc->kpthsc_requested_qos_sync_ipc_override << 20)
);
+ BUF_DATA(PERF_TI_SCHEDDATA3_32, UPPER_32(thsc->kpthsc_runnable_time),
+ LOWER_32(thsc->kpthsc_runnable_time));
#endif /* defined(__LP64__) */
}
BUF_INFO(PERF_TI_DISPSAMPLE | DBG_FUNC_START, (uintptr_t)thread_tid(thread));
task_t task = thread->task;
- boolean_t task_64 = task_has_64BitAddr(task);
+ boolean_t task_64 = task_has_64Bit_addr(task);
size_t user_addr_size = task_64 ? 8 : 4;
assert(thread->task != kernel_task);
BUF_DATA(PERF_TI_INSCYCDATA_32, 0, 0, UPPER_32(counts[MT_CORE_CYCLES]),
LOWER_32(counts[MT_CORE_CYCLES]));
#endif /* !defined(__LP64__) */
-#else /* MONOTONIC */
+
+#else
#pragma unused(context)
-#endif /* !MONOTONIC */
+#endif /* MONOTONIC */
+
}