X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=rts%2FTrace.h;h=4f3ebcec6368845c2d4f6fd6055b0939480769b4;hb=d108044bef62f6a0d579c92ced5e8188f72edc2d;hp=f8b6ad497dd17cb97b55d15e3f0d3c50c08918d5;hpb=015d3d46b6de2f95386a515a7d166d996a0416db;p=ghc-hetmet.git diff --git a/rts/Trace.h b/rts/Trace.h index f8b6ad4..4f3ebce 100644 --- a/rts/Trace.h +++ b/rts/Trace.h @@ -16,7 +16,7 @@ #include "RtsProbes.h" #endif /* defined(DTRACE) */ -BEGIN_RTS_PRIVATE +#include "BeginPrivate.h" // ----------------------------------------------------------------------------- // EventLog API @@ -135,6 +135,15 @@ void traceUserMsg(Capability *cap, char *msg); #define debugTrace(class, str, ...) /* nothing */ #endif +#ifdef DEBUG +#define debugTraceCap(class, cap, msg, ...) \ + if (RTS_UNLIKELY(class)) { \ + traceCap_(cap, msg, ##__VA_ARGS__); \ + } +#else +#define debugTraceCap(class, cap, str, ...) /* nothing */ +#endif + /* * Emit a message/event describing the state of a thread */ @@ -152,6 +161,7 @@ void traceThreadStatus_ (StgTSO *tso); #define traceCap(class, cap, msg, ...) /* nothing */ #define trace(class, msg, ...) /* nothing */ #define debugTrace(class, str, ...) /* nothing */ +#define debugTraceCap(class, cap, str, ...) /* nothing */ #define traceThreadStatus(class, tso) /* nothing */ #endif /* TRACING */ @@ -387,6 +397,6 @@ INLINE_HEADER void traceEventGcDone(Capability *cap STG_UNUSED) dtraceGcDone((EventCapNo)cap->no); } -END_RTS_PRIVATE +#include "EndPrivate.h" #endif /* TRACE_H */