diff options
author | Simon Marlow <simonmarhaskell@gmail.com> | 2008-04-16 22:15:16 +0000 |
---|---|---|
committer | Simon Marlow <simonmarhaskell@gmail.com> | 2008-04-16 22:15:16 +0000 |
commit | 1663532f26ae2e68f04d067b11bd177d307637b1 (patch) | |
tree | 35bfafd610d384fc4437b43c85a9dc7100fff8d1 /rts/sm | |
parent | 8ac01a644677a71cbfb4cc5974c3641716d92104 (diff) | |
download | haskell-1663532f26ae2e68f04d067b11bd177d307637b1.tar.gz |
calculate and report slop (wasted space at the end of blocks)
Diffstat (limited to 'rts/sm')
-rw-r--r-- | rts/sm/GC.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/rts/sm/GC.c b/rts/sm/GC.c index 97b32b653d..7a6889cd72 100644 --- a/rts/sm/GC.c +++ b/rts/sm/GC.c @@ -181,7 +181,7 @@ GarbageCollect ( rtsBool force_major_gc ) { bdescr *bd; step *stp; - lnat live, allocated, max_copied, avg_copied; + lnat live, allocated, max_copied, avg_copied, slop; lnat oldgen_saved_blocks = 0; gc_thread *saved_gct; nat g, s, t, n; @@ -722,7 +722,8 @@ GarbageCollect ( rtsBool force_major_gc ) #endif // ok, GC over: tell the stats department what happened. - stat_endGC(allocated, live, copied, N, max_copied, avg_copied); + slop = calcLiveBlocks() * BLOCK_SIZE_W - live; + stat_endGC(allocated, live, copied, N, max_copied, avg_copied, slop); #if defined(RTS_USER_SIGNALS) if (RtsFlags.MiscFlags.install_signal_handlers) { |