diff options
author | Simon Marlow <marlowsd@gmail.com> | 2009-12-04 11:08:39 +0000 |
---|---|---|
committer | Simon Marlow <marlowsd@gmail.com> | 2009-12-04 11:08:39 +0000 |
commit | a0ca27ac659bcbe0c291b3bd1a12a965f43f5f55 (patch) | |
tree | 5e0b357cf3012cb0dd71802c45d16580af25d706 /rts/sm | |
parent | 5f9075dae09b9c7eff4cdf8d3fc339ea0d909d57 (diff) | |
download | haskell-a0ca27ac659bcbe0c291b3bd1a12a965f43f5f55.tar.gz |
Correction to the allocation stats following earlier refactoring
Diffstat (limited to 'rts/sm')
-rw-r--r-- | rts/sm/GC.c | 1 | ||||
-rw-r--r-- | rts/sm/Storage.c | 5 |
2 files changed, 6 insertions, 0 deletions
diff --git a/rts/sm/GC.c b/rts/sm/GC.c index dc4c68fe75..99b0eccefa 100644 --- a/rts/sm/GC.c +++ b/rts/sm/GC.c @@ -649,6 +649,7 @@ SET_GCT(gc_threads[0]); freeChain(gen->large_objects); gen->large_objects = gen->scavenged_large_objects; gen->n_large_blocks = gen->n_scavenged_large_blocks; + gen->n_new_large_blocks = 0; ASSERT(countBlocks(gen->large_objects) == gen->n_large_blocks); } else // for generations > N diff --git a/rts/sm/Storage.c b/rts/sm/Storage.c index d9c7f86278..4498bda299 100644 --- a/rts/sm/Storage.c +++ b/rts/sm/Storage.c @@ -79,6 +79,7 @@ initGeneration (generation *gen, int g) gen->n_old_blocks = 0; gen->large_objects = NULL; gen->n_large_blocks = 0; + gen->n_new_large_blocks = 0; gen->mut_list = allocBlock(); gen->scavenged_large_objects = NULL; gen->n_scavenged_large_blocks = 0; @@ -567,6 +568,7 @@ allocate (Capability *cap, lnat n) bd = allocGroup(req_blocks); dbl_link_onto(bd, &g0->large_objects); g0->n_large_blocks += bd->blocks; // might be larger than req_blocks + g0->n_new_large_blocks += bd->blocks; RELEASE_SM_LOCK; initBdescr(bd, g0, g0); bd->flags = BF_LARGE; @@ -666,6 +668,7 @@ allocatePinned (Capability *cap, lnat n) cap->pinned_object_block = bd = allocBlock(); dbl_link_onto(bd, &g0->large_objects); g0->n_large_blocks++; + g0->n_new_large_blocks++; RELEASE_SM_LOCK; initBdescr(bd, g0, g0); bd->flags = BF_PINNED | BF_LARGE; @@ -784,6 +787,8 @@ calcAllocated( void ) } } + allocated += g0->n_new_large_blocks * BLOCK_SIZE_W; + total_allocated += allocated; return allocated; } |