X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Frts%2FProfHeap.c;fp=ghc%2Frts%2FProfHeap.c;h=70cafdede168da1165562a61cb303dbcb31daab8;hb=0f3205e6c40575910d50bc2cc42020ccf55e07ba;hp=482895f98bb33bf2e267d134db2c02d49956467a;hpb=b43be28258a3d49bde40095b210047e99742f8a5;p=ghc-hetmet.git diff --git a/ghc/rts/ProfHeap.c b/ghc/rts/ProfHeap.c index 482895f..70cafde 100644 --- a/ghc/rts/ProfHeap.c +++ b/ghc/rts/ProfHeap.c @@ -867,9 +867,24 @@ heapCensusChain( Census *census, bdescr *bd ) switch (info->type) { + case THUNK: + size = thunk_sizeW_fromITBL(info); + break; + + case THUNK_1_1: + case THUNK_0_2: + case THUNK_2_0: + size = sizeofW(StgHeader) + stg_max(MIN_UPD_SIZE,2); + break; + + case THUNK_1_0: + case THUNK_0_1: + case THUNK_SELECTOR: + size = sizeofW(StgHeader) + stg_max(MIN_UPD_SIZE,1); + break; + case CONSTR: case FUN: - case THUNK: case IND_PERM: case IND_OLDGEN: case IND_OLDGEN_PERM: @@ -884,9 +899,6 @@ heapCensusChain( Census *census, bdescr *bd ) case FUN_1_1: case FUN_0_2: case FUN_2_0: - case THUNK_1_1: - case THUNK_0_2: - case THUNK_2_0: case CONSTR_1_0: case CONSTR_0_1: case CONSTR_1_1: @@ -909,13 +921,10 @@ heapCensusChain( Census *census, bdescr *bd ) size = sizeW_fromITBL(info); break; - case THUNK_1_0: /* ToDo - shouldn't be here */ - case THUNK_0_1: /* " ditto " */ - case THUNK_SELECTOR: - size = sizeofW(StgHeader) + MIN_UPD_SIZE; + case AP: + size = ap_sizeW((StgAP *)p); break; - case AP: case PAP: size = pap_sizeW((StgPAP *)p); break;