diff options
author | Simon Marlow <marlowsd@gmail.com> | 2009-10-15 10:02:12 +0000 |
---|---|---|
committer | Simon Marlow <marlowsd@gmail.com> | 2009-10-15 10:02:12 +0000 |
commit | 1f56fae4a10f7fb56b8fbab5ab9ad95add1ed1dd (patch) | |
tree | 03ed9129c79b2816dc8f89de56c5711a640c6139 /rts/Trace.h | |
parent | d46df548da44cff511cd0d656a1ec92c4551d653 (diff) | |
download | haskell-1f56fae4a10f7fb56b8fbab5ab9ad95add1ed1dd.tar.gz |
Add events to show when GC threads are idle/working
Diffstat (limited to 'rts/Trace.h')
-rw-r--r-- | rts/Trace.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/rts/Trace.h b/rts/Trace.h index f422b5f8a5..21828d261f 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). @@ -133,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 */ |