Massive patch for the first months work adding System FC to GHC #35
[ghc-hetmet.git] / rts / Stats.c
index f0f61b2..248b0af 100644 (file)
@@ -75,6 +75,11 @@ Ticks stat_getElapsedGCTime(void)
     return GCe_tot_time;
 }
 
+Ticks stat_getElapsedTime(void)
+{
+    return getProcessElapsedTime() - ElapsedTimeStart;
+}
+
 /* mut_user_time_during_GC() and mut_user_time()
  *
  * The former function can be used to get the current mutator time
@@ -532,6 +537,9 @@ stat_exit(int alloc)
        statsFlush();
        statsClose();
     }
+    if (GC_coll_times)
+      stgFree(GC_coll_times);
+    GC_coll_times = NULL;
 }
 
 /* -----------------------------------------------------------------------------