diff options
author | Simon Marlow <simonmarhaskell@gmail.com> | 2008-04-17 21:27:07 +0000 |
---|---|---|
committer | Simon Marlow <simonmarhaskell@gmail.com> | 2008-04-17 21:27:07 +0000 |
commit | 4e79709df545c16812b85f2c27ab3411f5a7b54f (patch) | |
tree | 518c23ecad5b34b5ad99d5ecd7b2fb2c52949c4f /rts/LdvProfile.c | |
parent | a4e09e8f27b81e915b128ef244c7b0d082bfb89a (diff) | |
download | haskell-4e79709df545c16812b85f2c27ab3411f5a7b54f.tar.gz |
remove EVACUATED: store the forwarding pointer in the info pointer
Diffstat (limited to 'rts/LdvProfile.c')
-rw-r--r-- | rts/LdvProfile.c | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/rts/LdvProfile.c b/rts/LdvProfile.c index 1e2ffc8c02..0cd80dee65 100644 --- a/rts/LdvProfile.c +++ b/rts/LdvProfile.c @@ -68,26 +68,27 @@ STATIC_INLINE nat processHeapClosureForDead( StgClosure *c ) { nat size; - StgInfoTable *info; + const StgInfoTable *info; info = get_itbl(c); - if (info->type != EVACUATED) { - ASSERT(((LDVW(c) & LDV_CREATE_MASK) >> LDV_SHIFT) <= era && - ((LDVW(c) & LDV_CREATE_MASK) >> LDV_SHIFT) > 0); - ASSERT(((LDVW(c) & LDV_STATE_MASK) == LDV_STATE_CREATE) || - ( - (LDVW(c) & LDV_LAST_MASK) <= era && - (LDVW(c) & LDV_LAST_MASK) > 0 - )); - } - - if (info->type == EVACUATED) { + info = c->header.info; + if (IS_FORWARDING_PTR(info)) { // The size of the evacuated closure is currently stored in // the LDV field. See SET_EVACUAEE_FOR_LDV() in // includes/StgLdvProf.h. return LDVW(c); } + info = INFO_PTR_TO_STRUCT(info); + + ASSERT(((LDVW(c) & LDV_CREATE_MASK) >> LDV_SHIFT) <= era && + ((LDVW(c) & LDV_CREATE_MASK) >> LDV_SHIFT) > 0); + ASSERT(((LDVW(c) & LDV_STATE_MASK) == LDV_STATE_CREATE) || + ( + (LDVW(c) & LDV_LAST_MASK) <= era && + (LDVW(c) & LDV_LAST_MASK) > 0 + )); + size = closure_sizeW(c); |