Unify event logging and debug tracing.
[ghc-hetmet.git] / rts / RtsStartup.c
index f0b2170..1c39cf8 100644 (file)
@@ -29,7 +29,6 @@
 #include "sm/BlockAlloc.h"
 #include "Trace.h"
 #include "Stable.h"
-#include "eventlog/EventLog.h"
 #include "Hash.h"
 #include "Profiling.h"
 #include "Timer.h"
@@ -146,7 +145,7 @@ hs_init(int *argc, char **argv[])
 #endif
 
     /* initTracing must be after setupRtsFlags() */
-#ifdef DEBUG
+#ifdef TRACING
     initTracing();
 #endif
 
@@ -190,12 +189,6 @@ hs_init(int *argc, char **argv[])
 
     initProfiling1();
 
-#ifdef EVENTLOG
-    if (RtsFlags.EventLogFlags.doEventLogging) {
-        initEventLogging();
-    }
-#endif
-
     /* start the virtual timer 'subsystem'. */
     initTimer();
     startTimer();
@@ -421,11 +414,9 @@ hs_exit_(rtsBool wait_foreign)
     if (prof_file != NULL) fclose(prof_file);
 #endif
 
-#ifdef EVENTLOG
-    if (RtsFlags.EventLogFlags.doEventLogging) {
-        endEventLogging();
-        freeEventLogging();
-    }
+#ifdef TRACING
+    endTracing();
+    freeTracing();
 #endif
 
 #if defined(TICKY_TICKY)