kperf_state |= KPERF_TI_IDLE;
}
-#if !CONFIG_EMBEDDED
+#if defined(XNU_TARGET_OS_OSX)
/* on desktop, if state is blank, leave not idle set */
if (kperf_state == 0) {
return TH_IDLE << 16;
}
-#endif /* !CONFIG_EMBEDDED */
+#endif /* defined(XNU_TARGET_OS_OSX) */
/* high two bytes are inverted mask, low two bytes are normal */
return ((~kperf_state & 0xffff) << 16) | (kperf_state & 0xffff);
}
thsn->kpthsn_suspend_count = thread->suspend_count;
- thsn->kpthsn_io_tier = proc_get_effective_thread_policy(thread, TASK_POLICY_IO);
+ /*
+ * Only have room for 8-bits in the trace event, so truncate here.
+ */
+ thsn->kpthsn_io_tier = (uint8_t)proc_get_effective_thread_policy(thread, TASK_POLICY_IO);
BUF_VERB(PERF_TI_SNAPSAMPLE | DBG_FUNC_END);
}
}
int
-kperf_thread_dispatch_pend(struct kperf_context *context)
+kperf_thread_dispatch_pend(struct kperf_context *context,
+ unsigned int actionid)
{
- return kperf_ast_pend(context->cur_thread, T_KPERF_AST_DISPATCH);
+ return kperf_ast_pend(context->cur_thread, T_KPERF_AST_DISPATCH,
+ actionid);
}
void