summaryrefslogtreecommitdiff
path: root/rts/Trace.c
diff options
context:
space:
mode:
Diffstat (limited to 'rts/Trace.c')
-rw-r--r--rts/Trace.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/rts/Trace.c b/rts/Trace.c
index 0c32737e1b..7d856d6dd7 100644
--- a/rts/Trace.c
+++ b/rts/Trace.c
@@ -47,6 +47,7 @@ int DEBUG_sparks;
// events
int TRACE_sched;
+int TRACE_spark;
#ifdef THREADED_RTS
static Mutex trace_utx;
@@ -90,8 +91,17 @@ void initTracing (void)
RtsFlags.TraceFlags.scheduler ||
RtsFlags.DebugFlags.scheduler;
+ // -Dr turns on spark tracing
+ TRACE_spark =
+ RtsFlags.TraceFlags.sparks ||
+ RtsFlags.DebugFlags.sparks;
+
eventlog_enabled = RtsFlags.TraceFlags.tracing == TRACE_EVENTLOG;
+ /* Note: we can have TRACE_sched or TRACE_spark turned on even when
+ eventlog_enabled is off. In the DEBUG way we may be tracing to stderr.
+ */
+
if (eventlog_enabled) {
initEventLogging();
}