X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=rts%2FLdvProfile.c;h=c95dd1befd23faa4abe9cbf8002a8f0c762cae54;hb=7cc184af587cdc8f29608cd98b738fa0322cfec4;hp=a1eef17ef16385c351ed5418d497815ddf8f197a;hpb=12c7ad877a75172186bd408dbc2d5b883dfc1361;p=ghc-hetmet.git diff --git a/rts/LdvProfile.c b/rts/LdvProfile.c index a1eef17..c95dd1b 100644 --- a/rts/LdvProfile.c +++ b/rts/LdvProfile.c @@ -98,6 +98,7 @@ processHeapClosureForDead( StgClosure *c ) 'inherently used' cases: do nothing. */ case TSO: + case STACK: case MVAR_CLEAN: case MVAR_DIRTY: case MUT_ARR_PTRS_CLEAN: @@ -109,13 +110,9 @@ processHeapClosureForDead( StgClosure *c ) case MUT_VAR_CLEAN: case MUT_VAR_DIRTY: case BCO: - case STABLE_NAME: - case TVAR_WATCH_QUEUE: - case TVAR: - case TREC_HEADER: + case PRIM: + case MUT_PRIM: case TREC_CHUNK: - case INVARIANT_CHECK_QUEUE: - case ATOMIC_INVARIANT: return size; /* @@ -144,20 +141,18 @@ processHeapClosureForDead( StgClosure *c ) case FUN_1_1: case FUN_0_2: case BLACKHOLE: - case CAF_BLACKHOLE: + case BLOCKING_QUEUE: case IND_PERM: - case IND_OLDGEN_PERM: /* 'Ingore' cases */ - // Why can we ignore IND/IND_OLDGEN closures? We assume that + // Why can we ignore IND closures? We assume that // any census is preceded by a major garbage collection, which - // IND/IND_OLDGEN closures cannot survive. Therefore, it is no - // use considering IND/IND_OLDGEN closures in the meanwhile + // IND closures cannot survive. Therefore, it is no + // use considering IND closures in the meanwhile // because they will perish before the next census at any // rate. case IND: - case IND_OLDGEN: // Found a dead closure: record its size LDV_recordDead(c, size); return size; @@ -174,6 +169,7 @@ processHeapClosureForDead( StgClosure *c ) // stack objects case UPDATE_FRAME: case CATCH_FRAME: + case UNDERFLOW_FRAME: case STOP_FRAME: case RET_DYN: case RET_BCO: @@ -259,7 +255,7 @@ processChainForDead( bdescr *bd ) void LdvCensusForDead( nat N ) { - nat g, s; + nat g; // ldvTime == 0 means that LDV profiling is currently turned off. if (era == 0) @@ -271,16 +267,11 @@ LdvCensusForDead( nat N ) // barf("Lag/Drag/Void profiling not supported with -G1"); } else { - for (g = 0; g <= N; g++) - for (s = 0; s < generations[g].n_steps; s++) { - if (g == 0 && s == 0) { - processNurseryForDead(); - processChainForDead(generations[g].steps[s].large_objects); - } else{ - processHeapForDead(generations[g].steps[s].old_blocks); - processChainForDead(generations[g].steps[s].large_objects); - } - } + processNurseryForDead(); + for (g = 0; g <= N; g++) { + processHeapForDead(generations[g].old_blocks); + processChainForDead(generations[g].large_objects); + } } }