X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/6d2010ae8f7a6078e10b361c6962983bab233e0f..04b8595b18b1b41ac7a206e4b3d51a635f8413d7:/iokit/Kernel/IOTimerEventSource.cpp diff --git a/iokit/Kernel/IOTimerEventSource.cpp b/iokit/Kernel/IOTimerEventSource.cpp index c71feccf0..df939da91 100644 --- a/iokit/Kernel/IOTimerEventSource.cpp +++ b/iokit/Kernel/IOTimerEventSource.cpp @@ -41,6 +41,9 @@ __END_DECLS #include #include +#if CONFIG_DTRACE +#include +#endif #define super IOEventSource OSDefineMetaClassAndStructors(IOTimerEventSource, IOEventSource) @@ -114,13 +117,16 @@ void IOTimerEventSource::timeout(void *self) if (trace) IOTimeStampStartConstant(IODBG_TIMES(IOTIMES_ACTION), - (uintptr_t) doit, (uintptr_t) me->owner); + VM_KERNEL_UNSLIDE(doit), (uintptr_t) me->owner); (*doit)(me->owner, me); +#if CONFIG_DTRACE + DTRACE_TMR3(iotescallout__expire, Action, doit, OSObject, me->owner, void, me->workLoop); +#endif if (trace) IOTimeStampEndConstant(IODBG_TIMES(IOTIMES_ACTION), - (uintptr_t) doit, (uintptr_t) me->owner); + VM_KERNEL_UNSLIDE(doit), (uintptr_t) me->owner); } IOStatisticsOpenGate(); wl->openGate(); @@ -153,13 +159,16 @@ void IOTimerEventSource::timeoutAndRelease(void * self, void * c) if (trace) IOTimeStampStartConstant(IODBG_TIMES(IOTIMES_ACTION), - (uintptr_t) doit, (uintptr_t) me->owner); + VM_KERNEL_UNSLIDE(doit), (uintptr_t) me->owner); (*doit)(me->owner, me); +#if CONFIG_DTRACE + DTRACE_TMR3(iotescallout__expire, Action, doit, OSObject, me->owner, void, me->workLoop); +#endif if (trace) IOTimeStampEndConstant(IODBG_TIMES(IOTIMES_ACTION), - (uintptr_t) doit, (uintptr_t) me->owner); + VM_KERNEL_UNSLIDE(doit), (uintptr_t) me->owner); } IOStatisticsOpenGate(); wl->openGate(); @@ -360,7 +369,7 @@ IOReturn IOTimerEventSource::wakeAtTime(AbsoluteTime inAbstime) reserved->workLoop = workLoop; reserved->calloutGeneration++; if (thread_call_enter1_delayed((thread_call_t) calloutEntry, - (void *) reserved->calloutGeneration, inAbstime)) + (void *)(uintptr_t) reserved->calloutGeneration, inAbstime)) { release(); workLoop->release();