summaryrefslogtreecommitdiff
path: root/rts/Trace.c
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2010-12-10 09:39:51 +0000
committerSimon Marlow <marlowsd@gmail.com>2010-12-10 09:39:51 +0000
commit00a4cdf7db3ac722db2346416a1b3b891dbc9a0a (patch)
tree2f3207b3f5254e8a8d101c744587fd93953b921f /rts/Trace.c
parenta201afd3d2c4bef07e4e7682b129f60dbdde0e8a (diff)
downloadhaskell-00a4cdf7db3ac722db2346416a1b3b891dbc9a0a.tar.gz
Only reset the event log if logging is turned on (addendum to #4512)
Diffstat (limited to 'rts/Trace.c')
-rw-r--r--rts/Trace.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/rts/Trace.c b/rts/Trace.c
index be3fff72d4..53fc25a249 100644
--- a/rts/Trace.c
+++ b/rts/Trace.c
@@ -106,6 +106,14 @@ void freeTracing (void)
}
}
+void resetTracing (void)
+{
+ if (eventlog_enabled) {
+ abortEventLogging(); // abort eventlog inherited from parent
+ initEventLogging(); // child starts its own eventlog
+ }
+}
+
/* ---------------------------------------------------------------------------
Emitting trace messages/events
--------------------------------------------------------------------------- */