X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=rts%2FLdvProfile.c;h=ccaf10c6844e3394a6eaf97561c70b78dc284b06;hp=c97187a9a933101921a16342d57b9edb591e5920;hb=7408b39235bccdcde48df2a73337ff976fbc09b7;hpb=a2a67cd520b9841114d69a87a423dabcb3b4368e diff --git a/rts/LdvProfile.c b/rts/LdvProfile.c index c97187a..ccaf10c 100644 --- a/rts/LdvProfile.c +++ b/rts/LdvProfile.c @@ -13,6 +13,7 @@ #include "Rts.h" #include "Profiling.h" +#include "LdvProfile.h" #include "Stats.h" #include "RtsUtils.h" #include "Schedule.h" @@ -108,7 +109,7 @@ processHeapClosureForDead( StgClosure *c ) case MUT_VAR_CLEAN: case MUT_VAR_DIRTY: case BCO: - case STABLE_NAME: + case PRIM: case TVAR_WATCH_QUEUE: case TVAR: case TREC_HEADER: @@ -179,11 +180,6 @@ processHeapClosureForDead( StgClosure *c ) case RET_SMALL: case RET_BIG: // others - case BLOCKED_FETCH: - case FETCH_ME: - case FETCH_ME_BQ: - case RBH: - case REMOTE_REF: case INVALID_OBJECT: default: barf("Invalid object in processHeapClosureForDead(): %d", info->type); @@ -237,27 +233,6 @@ processNurseryForDead( void ) } /* -------------------------------------------------------------------------- - * Calls processHeapClosureForDead() on every *dead* closures in the - * small object pool. - * ----------------------------------------------------------------------- */ -static void -processSmallObjectPoolForDead( void ) -{ - bdescr *bd; - StgPtr p; - - for (bd = g0s0->blocks; bd != NULL; bd = bd->link) { - p = bd->start; - while (p < bd->free) { - p += processHeapClosureForDead((StgClosure *)p); - while (p < bd->free && !*p) // skip slop - p++; - } - ASSERT(p == bd->free); - } -} - -/* -------------------------------------------------------------------------- * Calls processHeapClosureForDead() on every *dead* closures in the closure * chain. * ----------------------------------------------------------------------- */ @@ -284,7 +259,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) @@ -296,17 +271,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) { - processSmallObjectPoolForDead(); - 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); + } } }