X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=rts%2FTrace.h;h=21828d261f7e741e5bccb3d2f8ac86dfe4885959;hb=facfbf28a9bd4edeebc23e6d74a77a7ea83e5c61;hp=775f2357738e90f7dd72dbcfd73a4b71fecda65b;hpb=064562360a310f08592d41e9fceb3404932c4a04;p=ghc-hetmet.git diff --git a/rts/Trace.h b/rts/Trace.h index 775f235..21828d2 100644 --- a/rts/Trace.h +++ b/rts/Trace.h @@ -79,6 +79,17 @@ void traceEnd (void); void traceSchedEvent_ (Capability *cap, EventTypeNum tag, StgTSO *tso, StgWord64 other); + +/* + * Record a nullary event + */ +#define traceEvent(cap, tag) \ + if (RTS_UNLIKELY(TRACE_sched)) { \ + traceEvent_(cap, tag); \ + } + +void traceEvent_ (Capability *cap, EventTypeNum tag); + // variadic macros are C99, and supported by gcc. However, the // ##__VA_ARGS syntax is a gcc extension, which allows the variable // argument list to be empty (see gcc docs for details). @@ -104,6 +115,11 @@ void traceCap_(Capability *cap, char *msg, ...); void trace_(char *msg, ...); /* + * A message or event emitted by the program + */ +void traceUserMsg(Capability *cap, char *msg); + +/* * Emit a debug message (only when DEBUG is defined) */ #ifdef DEBUG @@ -128,6 +144,7 @@ void traceThreadStatus_ (StgTSO *tso); #else /* !TRACING */ #define traceSchedEvent(cap, tag, tso, other) /* nothing */ +#define traceEvent(cap, tag) /* nothing */ #define traceCap(class, cap, msg, ...) /* nothing */ #define trace(class, msg, ...) /* nothing */ #define debugTrace(class, str, ...) /* nothing */