X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=rts%2FProfHeap.c;h=15337d4585067649ee7f265f9f83d92a1f3f6e1d;hb=0a5613f40b0e32cf59966e6b56b807cdbe80aa7b;hp=f446d0b09b080d931f58827db5c2d3aaca13f029;hpb=9a0030858ea9f26bb8fddc920f217f431f5bdebb;p=ghc-hetmet.git diff --git a/rts/ProfHeap.c b/rts/ProfHeap.c index f446d0b..15337d4 100644 --- a/rts/ProfHeap.c +++ b/rts/ProfHeap.c @@ -15,6 +15,7 @@ #include "Stats.h" #include "Hash.h" #include "RetainerProfile.h" +#include "LdvProfile.h" #include "Arena.h" #include "Printer.h" @@ -1066,7 +1067,7 @@ heapCensusChain( Census *census, bdescr *bd ) void heapCensus( void ) { - nat g, s; + nat g; Census *census; census = &censuses[era]; @@ -1084,17 +1085,11 @@ heapCensus( void ) #endif // Traverse the heap, collecting the census info - if (RtsFlags.GcFlags.generations == 1) { - heapCensusChain( census, g0s0->blocks ); - } else { - for (g = 0; g < RtsFlags.GcFlags.generations; g++) { - for (s = 0; s < generations[g].n_steps; s++) { - heapCensusChain( census, generations[g].steps[s].blocks ); - // Are we interested in large objects? might be - // confusing to include the stack in a heap profile. - heapCensusChain( census, generations[g].steps[s].large_objects ); - } - } + for (g = 0; g < RtsFlags.GcFlags.generations; g++) { + heapCensusChain( census, generations[g].blocks ); + // Are we interested in large objects? might be + // confusing to include the stack in a heap profile. + heapCensusChain( census, generations[g].large_objects ); } // dump out the census info