X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=rts%2Fsm%2FSanity.c;h=dfa98657a03879d9f1591480624a0c8295ccef07;hb=83d563cb9ede0ba792836e529b1e2929db926355;hp=2069711bafdbdb3dd2287427c0ce6846d5652bb3;hpb=2726a2f10256710cc6ed80b1098cb32e121e1be7;p=ghc-hetmet.git diff --git a/rts/sm/Sanity.c b/rts/sm/Sanity.c index 2069711..dfa9865 100644 --- a/rts/sm/Sanity.c +++ b/rts/sm/Sanity.c @@ -26,6 +26,7 @@ #include "Apply.h" #include "Printer.h" #include "Arena.h" +#include "RetainerProfile.h" /* ----------------------------------------------------------------------------- Forward decls. @@ -303,8 +304,6 @@ checkClosure( StgClosure* p ) case CONSTR_0_2: case CONSTR_2_0: case IND_PERM: - case IND_OLDGEN: - case IND_OLDGEN_PERM: case BLACKHOLE: case PRIM: case MUT_PRIM: @@ -474,16 +473,18 @@ checkHeap(bdescr *bd) #endif for (; bd != NULL; bd = bd->link) { - p = bd->start; - while (p < bd->free) { - nat size = checkClosure((StgClosure *)p); - /* This is the smallest size of closure that can live in the heap */ - ASSERT( size >= MIN_PAYLOAD_SIZE + sizeofW(StgHeader) ); - p += size; + if(!(bd->flags & BF_SWEPT)) { + p = bd->start; + while (p < bd->free) { + nat size = checkClosure((StgClosure *)p); + /* This is the smallest size of closure that can live in the heap */ + ASSERT( size >= MIN_PAYLOAD_SIZE + sizeofW(StgHeader) ); + p += size; - /* skip over slop */ - while (p < bd->free && - (*p < 0x1000 || !LOOKS_LIKE_INFO_PTR(*p))) { p++; } + /* skip over slop */ + while (p < bd->free && + (*p < 0x1000 || !LOOKS_LIKE_INFO_PTR(*p))) { p++; } + } } } } @@ -533,7 +534,9 @@ checkTSO(StgTSO *tso) return; } - ASSERT(tso->_link == END_TSO_QUEUE || get_itbl(tso->_link)->type == TSO); + ASSERT(tso->_link == END_TSO_QUEUE || + tso->_link->header.info == &stg_MVAR_TSO_QUEUE_info || + tso->_link->header.info == &stg_TSO_info); ASSERT(LOOKS_LIKE_CLOSURE_PTR(tso->block_info.closure)); ASSERT(LOOKS_LIKE_CLOSURE_PTR(tso->bq)); ASSERT(LOOKS_LIKE_CLOSURE_PTR(tso->blocked_exceptions));