X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Frts%2FProfHeap.c;h=362bafe2d3bb78cf8004d6b02df89ae574eb75f5;hb=91b07216be1cb09230b7d1b417899ddea8620ff3;hp=2593d1e2fa7aeac73807d06410f19bf16cbd02fe;hpb=fcb34f7bb31145fb2639b4410415d796ca43114b;p=ghc-hetmet.git diff --git a/ghc/rts/ProfHeap.c b/ghc/rts/ProfHeap.c index 2593d1e..362bafe 100644 --- a/ghc/rts/ProfHeap.c +++ b/ghc/rts/ProfHeap.c @@ -23,7 +23,6 @@ #include "ProfHeap.h" #include "Stats.h" #include "Hash.h" -#include "StrHash.h" #include "RetainerProfile.h" #include "LdvProfile.h" #include "Arena.h" @@ -154,12 +153,13 @@ static char *type_names[] = { , "ARR_WORDS" - , "MUT_ARR_PTRS" + , "MUT_ARR_PTRS_CLEAN" + , "MUT_ARR_PTRS_DIRTY" , "MUT_ARR_PTRS_FROZEN" - , "MUT_VAR" + , "MUT_VAR_CLEAN" + , "MUT_VAR_DIRTY" , "WEAK" - , "FOREIGN" , "TSO" @@ -405,7 +405,7 @@ initHeapProfiling(void) #ifdef PROFILING if (doingLDVProfiling() && doingRetainerProfiling()) { errorBelch("cannot mix -hb and -hr"); - stg_exit(1); + stg_exit(EXIT_FAILURE); } #endif @@ -907,6 +907,17 @@ heapCensusChain( Census *census, bdescr *bd ) size = sizeW_fromITBL(info); break; + case IND: + // Special case/Delicate Hack: INDs don't normally + // appear, since we're doing this heap census right + // after GC. However, GarbageCollect() also does + // resurrectThreads(), which can update some + // blackholes when it calls raiseAsync() on the + // resurrected threads. So we know that any IND will + // be the size of a BLACKHOLE. + size = BLACKHOLE_sizeW(); + break; + case BCO: prim = rtsTrue; size = bco_sizeW((StgBCO *)p); @@ -914,9 +925,9 @@ heapCensusChain( Census *census, bdescr *bd ) case MVAR: case WEAK: - case FOREIGN: case STABLE_NAME: - case MUT_VAR: + case MUT_VAR_CLEAN: + case MUT_VAR_DIRTY: prim = rtsTrue; size = sizeW_fromITBL(info); break; @@ -938,8 +949,10 @@ heapCensusChain( Census *census, bdescr *bd ) size = arr_words_sizeW(stgCast(StgArrWords*,p)); break; - case MUT_ARR_PTRS: + case MUT_ARR_PTRS_CLEAN: + case MUT_ARR_PTRS_DIRTY: case MUT_ARR_PTRS_FROZEN: + case MUT_ARR_PTRS_FROZEN0: prim = rtsTrue; size = mut_arr_ptrs_sizeW((StgMutArrPtrs *)p); break; @@ -960,8 +973,28 @@ heapCensusChain( Census *census, bdescr *bd ) } #endif + case TREC_HEADER: + prim = rtsTrue; + size = sizeofW(StgTRecHeader); + break; + + case TVAR_WAIT_QUEUE: + prim = rtsTrue; + size = sizeofW(StgTVarWaitQueue); + break; + + case TVAR: + prim = rtsTrue; + size = sizeofW(StgTVar); + break; + + case TREC_CHUNK: + prim = rtsTrue; + size = sizeofW(StgTRecChunk); + break; + default: - barf("heapCensus"); + barf("heapCensus, unknown object: %d", info->type); } identity = NULL;