merge GHC HEAD
[ghc-hetmet.git] / rts / RtsStartup.c
index 502906e..c115701 100644 (file)
@@ -144,19 +144,18 @@ hs_init(int *argc, char **argv[])
 #ifdef TRACING
     initTracing();
 #endif
-    /* Dtrace events are always enabled
+    /* Trace the startup event
      */
-    dtraceEventStartup();
-
-    /* Trace some basic information about the process
-     */
-    traceCapsetDetails(argc, argv);
+    traceEventStartup();
 
     /* initialise scheduler data structures (needs to be done before
      * initStorage()).
      */
     initScheduler();
 
+    /* Trace some basic information about the process */
+    traceOSProcessInfo();
+
     /* initialize the storage manager */
     initStorage();
 
@@ -301,9 +300,6 @@ hs_exit_(rtsBool wait_foreign)
     checkFPUStack();
 #endif
 
-    // Free the full argv storage
-    freeFullProgArgv();
-
 #if defined(THREADED_RTS)
     ioManagerDie();
 #endif
@@ -406,6 +402,8 @@ hs_exit_(rtsBool wait_foreign)
     // heap memory (e.g. by being passed a ByteArray#).
     freeStorage(wait_foreign);
 
+    // Free the various argvs
+    freeRtsArgs();
 }
 
 // The real hs_exit():