-#define OUR_PMLog(t, a, b) do { \
- if (gIOKitDebug & kIOLogPower) \
- pwrMgt->pmPrint(t, a, b); \
- if (gIOKitTrace & kIOTracePowerMgmt) \
- pwrMgt->pmTrace(t, a, b); \
+#define OUR_PMLog(t, a, b) do { \
+ if (pwrMgt) { \
+ if (gIOKitDebug & kIOLogPower) \
+ pwrMgt->pmPrint(t, a, b); \
+ if (gIOKitTrace & kIOTracePowerMgmt) \
+ pwrMgt->pmTrace(t, DBG_FUNC_NONE, a, b); \
+ } \
+ } while(0)
+
+#define OUR_PMLogFuncStart(t, a, b) do { \
+ if (pwrMgt) { \
+ if (gIOKitDebug & kIOLogPower) \
+ pwrMgt->pmPrint(t, a, b); \
+ if (gIOKitTrace & kIOTracePowerMgmt) \
+ pwrMgt->pmTrace(t, DBG_FUNC_START, a, b); \
+ } \
+ } while(0)
+
+#define OUR_PMLogFuncEnd(t, a, b) do { \
+ if (pwrMgt) { \
+ if (gIOKitDebug & kIOLogPower) \
+ pwrMgt->pmPrint(-t, a, b); \
+ if (gIOKitTrace & kIOTracePowerMgmt) \
+ pwrMgt->pmTrace(t, DBG_FUNC_END, a, b); \
+ } \