X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=rts%2FLdvProfile.c;h=6a807cf37747a0076e151dba29fa356adf3144f0;hb=1e0f31543a0ee99c712c517de2bb1053e046b8db;hp=1e2ffc8c027be5bea43596bc4f7fc4abd0ad70af;hpb=6202305819577fce2b11ab509ed94422775df30e;p=ghc-hetmet.git diff --git a/rts/LdvProfile.c b/rts/LdvProfile.c index 1e2ffc8..6a807cf 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); @@ -142,9 +143,7 @@ processHeapClosureForDead( StgClosure *c ) case FUN_1_1: case FUN_0_2: case BLACKHOLE: - case SE_BLACKHOLE: case CAF_BLACKHOLE: - case SE_CAF_BLACKHOLE: case IND_PERM: case IND_OLDGEN_PERM: /*