+#define debugTraceCap(class, cap, str, ...) /* nothing */
+#define traceThreadStatus(class, tso) /* nothing */
+
+#endif /* TRACING */
+
+// If DTRACE is enabled, but neither DEBUG nor TRACING, we need a C land
+// wrapper for the user-msg probe (as we can't expand that in PrimOps.cmm)
+//
+#if !defined(DEBUG) && !defined(TRACING) && defined(DTRACE)
+
+void dtraceUserMsgWrapper(Capability *cap, char *msg);
+
+#endif /* !defined(DEBUG) && !defined(TRACING) && defined(DTRACE) */
+
+// -----------------------------------------------------------------------------
+// Aliases for static dtrace probes if dtrace is available
+// -----------------------------------------------------------------------------
+
+#if defined(DTRACE)
+
+#define dtraceCreateThread(cap, tid) \
+ HASKELLEVENT_CREATE_THREAD(cap, tid)
+#define dtraceRunThread(cap, tid) \
+ HASKELLEVENT_RUN_THREAD(cap, tid)
+#define dtraceStopThread(cap, tid, status) \
+ HASKELLEVENT_STOP_THREAD(cap, tid, status)
+#define dtraceThreadRunnable(cap, tid) \
+ HASKELLEVENT_THREAD_RUNNABLE(cap, tid)
+#define dtraceMigrateThread(cap, tid, new_cap) \
+ HASKELLEVENT_MIGRATE_THREAD(cap, tid, new_cap)
+#define dtraceRunSpark(cap, tid) \
+ HASKELLEVENT_RUN_SPARK(cap, tid)
+#define dtraceStealSpark(cap, tid, victim_cap) \
+ HASKELLEVENT_STEAL_SPARK(cap, tid, victim_cap)
+#define dtraceShutdown(cap) \
+ HASKELLEVENT_SHUTDOWN(cap)
+#define dtraceThreadWakeup(cap, tid, other_cap) \
+ HASKELLEVENT_THREAD_WAKEUP(cap, tid, other_cap)
+#define dtraceGcStart(cap) \
+ HASKELLEVENT_GC_START(cap)
+#define dtraceGcEnd(cap) \
+ HASKELLEVENT_GC_END(cap)
+#define dtraceRequestSeqGc(cap) \
+ HASKELLEVENT_REQUEST_SEQ_GC(cap)
+#define dtraceRequestParGc(cap) \
+ HASKELLEVENT_REQUEST_PAR_GC(cap)
+#define dtraceCreateSparkThread(cap, spark_tid) \
+ HASKELLEVENT_CREATE_SPARK_THREAD(cap, spark_tid)
+#define dtraceStartup(num_caps) \
+ HASKELLEVENT_STARTUP(num_caps)
+#define dtraceUserMsg(cap, msg) \
+ HASKELLEVENT_USER_MSG(cap, msg)
+#define dtraceGcIdle(cap) \
+ HASKELLEVENT_GC_IDLE(cap)
+#define dtraceGcWork(cap) \
+ HASKELLEVENT_GC_WORK(cap)
+#define dtraceGcDone(cap) \
+ HASKELLEVENT_GC_DONE(cap)
+
+#else /* !defined(DTRACE) */
+
+#define dtraceCreateThread(cap, tid) /* nothing */
+#define dtraceRunThread(cap, tid) /* nothing */
+#define dtraceStopThread(cap, tid, status) /* nothing */
+#define dtraceThreadRunnable(cap, tid) /* nothing */
+#define dtraceMigrateThread(cap, tid, new_cap) /* nothing */
+#define dtraceRunSpark(cap, tid) /* nothing */
+#define dtraceStealSpark(cap, tid, victim_cap) /* nothing */
+#define dtraceShutdown(cap) /* nothing */
+#define dtraceThreadWakeup(cap, tid, other_cap) /* nothing */
+#define dtraceGcStart(cap) /* nothing */
+#define dtraceGcEnd(cap) /* nothing */
+#define dtraceRequestSeqGc(cap) /* nothing */
+#define dtraceRequestParGc(cap) /* nothing */
+#define dtraceCreateSparkThread(cap, spark_tid) /* nothing */
+#define dtraceStartup(num_caps) /* nothing */
+#define dtraceUserMsg(cap, msg) /* nothing */
+#define dtraceGcIdle(cap) /* nothing */
+#define dtraceGcWork(cap) /* nothing */
+#define dtraceGcDone(cap) /* nothing */