X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Frts%2FProfHeap.c;h=59447e494efa6d5abae52af3274f0191176458f1;hb=8a223184539a3d6959690580b38b23b489a67408;hp=b640feaa1d8f05f577eb9da8eb1a34c408e0bf0d;hpb=e792bb8488aa3c33d7b186abdf53aa8b0ef68b11;p=ghc-hetmet.git diff --git a/ghc/rts/ProfHeap.c b/ghc/rts/ProfHeap.c index b640fea..59447e4 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" @@ -404,7 +403,7 @@ initHeapProfiling(void) #ifdef PROFILING if (doingLDVProfiling() && doingRetainerProfiling()) { errorBelch("cannot mix -hb and -hr"); - stg_exit(1); + stg_exit(EXIT_FAILURE); } #endif @@ -906,6 +905,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); @@ -938,6 +948,7 @@ heapCensusChain( Census *census, bdescr *bd ) case MUT_ARR_PTRS: case MUT_ARR_PTRS_FROZEN: + case MUT_ARR_PTRS_FROZEN0: prim = rtsTrue; size = mut_arr_ptrs_sizeW((StgMutArrPtrs *)p); break; @@ -958,8 +969,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;