X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=rts%2FStats.c;h=3036ed726548683ed40f8b3972b391ff7a5666d8;hp=3e7b5d822f43777e86313b68c9bb53cf98369c0e;hb=1b381af863d64aaa0a4dd9c816170c58e6131a9e;hpb=cc2ea98ac4a15e40a15e89de9e47f33e191ba393 diff --git a/rts/Stats.c b/rts/Stats.c index 3e7b5d8..3036ed7 100644 --- a/rts/Stats.c +++ b/rts/Stats.c @@ -547,6 +547,18 @@ stat_exit(int alloc) gc_elapsed += GC_coll_elapsed[i]; } + init_cpu = end_init_cpu - start_init_cpu; + init_elapsed = end_init_elapsed - start_init_elapsed; + + exit_cpu = end_exit_cpu - start_exit_cpu; + exit_elapsed = end_exit_elapsed - start_exit_elapsed; + + mut_elapsed = start_exit_elapsed - end_init_elapsed - gc_elapsed; + + mut_cpu = start_exit_cpu - end_init_cpu - gc_cpu + - PROF_VAL(RP_tot_time + HC_tot_time); + if (mut_cpu < 0) { mut_cpu = 0; } + if (RtsFlags.GcFlags.giveStats >= SUMMARY_GC_STATS) { showStgWord64(GC_tot_alloc*sizeof(W_), temp, rtsTrue/*commas*/); @@ -635,21 +647,9 @@ stat_exit(int alloc) } #endif - init_cpu = end_init_cpu - start_init_cpu; - init_elapsed = end_init_elapsed - start_init_elapsed; - - exit_cpu = end_exit_cpu - start_exit_cpu; - exit_elapsed = end_exit_elapsed - start_exit_elapsed; - statsPrintf(" INIT time %6.2fs (%6.2fs elapsed)\n", TICK_TO_DBL(init_cpu), TICK_TO_DBL(init_elapsed)); - mut_elapsed = start_exit_elapsed - end_init_elapsed - gc_elapsed; - - mut_cpu = start_exit_cpu - end_init_cpu - gc_cpu - - PROF_VAL(RP_tot_time + HC_tot_time); - if (mut_cpu < 0) { mut_cpu = 0; } - statsPrintf(" MUT time %6.2fs (%6.2fs elapsed)\n", TICK_TO_DBL(mut_cpu), TICK_TO_DBL(mut_elapsed)); statsPrintf(" GC time %6.2fs (%6.2fs elapsed)\n", @@ -753,12 +753,18 @@ stat_exit(int alloc) statsClose(); } - if (GC_coll_cpu) + if (GC_coll_cpu) { stgFree(GC_coll_cpu); - GC_coll_cpu = NULL; - if (GC_coll_elapsed) + GC_coll_cpu = NULL; + } + if (GC_coll_elapsed) { stgFree(GC_coll_elapsed); - GC_coll_elapsed = NULL; + GC_coll_elapsed = NULL; + } + if (GC_coll_max_pause) { + stgFree(GC_coll_max_pause); + GC_coll_max_pause = NULL; + } } /* -----------------------------------------------------------------------------