X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;ds=sidebyside;f=rts%2FStats.c;h=aabe259014a756b70096a5a95e7111928e89cbee;hb=74a87d705449e2f9ad4021aeebf8149ce35a6a2e;hp=28d09bdbedea1bdd15c4e93df873e3776f3c9903;hpb=0065d5ab628975892cea1ec7303f968c3338cbe1;p=ghc-hetmet.git diff --git a/rts/Stats.c b/rts/Stats.c index 28d09bd..aabe2590 100644 --- a/rts/Stats.c +++ b/rts/Stats.c @@ -10,11 +10,11 @@ #include "RtsFlags.h" #include "RtsUtils.h" #include "MBlock.h" +#include "Storage.h" #include "Schedule.h" #include "Stats.h" #include "ParTicky.h" /* ToDo: move into Rts.h */ #include "Profiling.h" -#include "Storage.h" #include "GetTime.h" /* huh? */ @@ -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; } /* ----------------------------------------------------------------------------- @@ -549,13 +557,13 @@ statDescribeGens(void) step *step; debugBelch( -" Gen Steps Max Mutable Step Blocks Live Large\n" -" Blocks Closures Objects\n"); +" Gen Steps Max Mut-list Step Blocks Live Large\n" +" Blocks Bytes Objects\n"); mut = 0; for (g = 0; g < RtsFlags.GcFlags.generations; g++) { for (bd = generations[g].mut_list; bd != NULL; bd = bd->link) { - mut += bd->free - bd->start; + mut += (bd->free - bd->start) * sizeof(W_); } debugBelch("%8d %8d %8d %9d", g, generations[g].n_steps, @@ -578,7 +586,7 @@ statDescribeGens(void) if (s != 0) { debugBelch("%36s",""); } - debugBelch("%6d %8d %8d %8d\n", s, step->n_blocks, + debugBelch("%6d %8d %8ld %8d\n", s, step->n_blocks, live, lge); } }