summaryrefslogtreecommitdiff
path: root/rts/Trace.h
diff options
context:
space:
mode:
authorMikolaj <mikolaj.konarski@gmail.com>2012-03-09 20:51:30 +0100
committerDuncan Coutts <duncan@well-typed.com>2012-04-04 19:10:45 +0100
commitc294d95dc04950ab4c5380bf6ce8651f621f8591 (patch)
treef7af5643c634205fa9fc390c0dd4db7558b7f7e2 /rts/Trace.h
parent598109eb0cc2271c33e23b4ddb12123991273f61 (diff)
downloadhaskell-c294d95dc04950ab4c5380bf6ce8651f621f8591.tar.gz
Add the GC_GLOBAL_SYNC event marking that all caps are stopped for GC
Quoting design rationale by dcoutts: The event indicates that we're doing a stop-the-world GC and all other HECs should be between their GC_START and GC_END events at that moment. We don't want to use GC_STATS_GHC for that, because GC_STATS_GHC is for extra GHC-specific info, not something we have to rely on to be able to match the GC pauses across HECs to a particular global GC.
Diffstat (limited to 'rts/Trace.h')
-rw-r--r--rts/Trace.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/rts/Trace.h b/rts/Trace.h
index 062666b503..c4c4e41608 100644
--- a/rts/Trace.h
+++ b/rts/Trace.h
@@ -350,6 +350,8 @@ INLINE_HEADER void dtraceStartup (int num_caps) {
HASKELLEVENT_GC_WORK(cap)
#define dtraceGcDone(cap) \
HASKELLEVENT_GC_DONE(cap)
+#define dtraceGcGlobalSync(cap) \
+ HASKELLEVENT_GC_GLOBAL_SYNC(cap)
#define dtraceEventGcStats(heap_capset, gens, \
copies, slop, fragmentation, \
par_n_threads, \
@@ -419,6 +421,7 @@ INLINE_HEADER void dtraceStartup (int num_caps STG_UNUSED) {};
#define dtraceGcIdle(cap) /* nothing */
#define dtraceGcWork(cap) /* nothing */
#define dtraceGcDone(cap) /* nothing */
+#define dtraceGcGlobalSync(cap) /* nothing */
#define dtraceEventGcStats(heap_capset, gens, \
copies, slop, fragmentation, \
par_n_threads, \
@@ -610,6 +613,12 @@ INLINE_HEADER void traceEventGcDone(Capability *cap STG_UNUSED)
dtraceGcDone((EventCapNo)cap->no);
}
+INLINE_HEADER void traceEventGcGlobalSync(Capability *cap STG_UNUSED)
+{
+ traceGcEvent(cap, EVENT_GC_GLOBAL_SYNC);
+ dtraceGcGlobalSync((EventCapNo)cap->no);
+}
+
INLINE_HEADER void traceEventGcStats(Capability *cap STG_UNUSED,
CapsetID heap_capset STG_UNUSED,
nat gen STG_UNUSED,