X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Frts%2FStats.c;h=28d09bdbedea1bdd15c4e93df873e3776f3c9903;hb=0dbbf1932d550293986af6244202cb735b2cd966;hp=985b77440490a276075fa9e08fdf1687ce3e3144;hpb=cc2926f3a6942e6c512bb64bfe2c2a6aae2c72b4;p=ghc-hetmet.git diff --git a/ghc/rts/Stats.c b/ghc/rts/Stats.c index 985b774..28d09bd 100644 --- a/ghc/rts/Stats.c +++ b/ghc/rts/Stats.c @@ -126,7 +126,7 @@ initStats(void) nat i; if (RtsFlags.GcFlags.giveStats >= VERBOSE_GC_STATS) { - statsPrintf(" Alloc Collect Live GC GC TOT TOT Page Flts\n"); + statsPrintf(" Alloc Copied Live GC GC TOT TOT Page Flts\n"); statsPrintf(" bytes bytes bytes user elap user elap\n"); } GC_coll_times = @@ -251,7 +251,7 @@ stat_startGC(void) -------------------------------------------------------------------------- */ void -stat_endGC (lnat alloc, lnat collect, lnat live, lnat copied, +stat_endGC (lnat alloc, lnat live, lnat copied, lnat scavd_copied, lnat gen) { if (RtsFlags.GcFlags.giveStats != NO_GC_STATS) { @@ -265,7 +265,8 @@ stat_endGC (lnat alloc, lnat collect, lnat live, lnat copied, nat faults = getPageFaults(); statsPrintf("%9ld %9ld %9ld", - alloc*sizeof(W_), collect*sizeof(W_), live*sizeof(W_)); + alloc*sizeof(W_), (copied+scavd_copied)*sizeof(W_), + live*sizeof(W_)); statsPrintf(" %5.2f %5.2f %7.2f %7.2f %4ld %4ld (Gen: %2ld)\n", TICK_TO_DBL(gc_time), TICK_TO_DBL(gc_etime), @@ -542,7 +543,8 @@ stat_exit(int alloc) void statDescribeGens(void) { - nat g, s, mut, lge, live; + nat g, s, mut, lge; + lnat live; bdescr *bd; step *step; @@ -561,10 +563,15 @@ statDescribeGens(void) for (s = 0; s < generations[g].n_steps; s++) { step = &generations[g].steps[s]; - for (bd = step->large_objects, lge = 0; bd; bd = bd->link) - lge++; live = 0; + for (bd = step->large_objects, lge = 0; bd; bd = bd->link) { + lge++; + } + live = step->n_large_blocks * BLOCK_SIZE; bd = step->blocks; + // This live figure will be slightly less that the "live" figure + // given by +RTS -Sstderr, because we take don't count the + // slop at the end of each block. for (; bd; bd = bd->link) { live += (bd->free - bd->start) * sizeof(W_); }