From 1663532f26ae2e68f04d067b11bd177d307637b1 Mon Sep 17 00:00:00 2001 From: Simon Marlow Date: Wed, 16 Apr 2008 22:15:16 +0000 Subject: calculate and report slop (wasted space at the end of blocks) --- rts/sm/GC.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'rts/sm') 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) { -- cgit v1.2.1