#include "ProfHeap.h"
#include "Stats.h"
#include "Hash.h"
-#include "StrHash.h"
#include "RetainerProfile.h"
#include "LdvProfile.h"
#include "Arena.h"
, "MUT_VAR"
, "WEAK"
- , "FOREIGN"
, "TSO"
#ifdef PROFILING
if (RtsFlags.ProfFlags.doHeapProfile == HEAP_BY_LDV) {
- fprintf(hp_file, "VOID\t%lu\n", census->void_total * sizeof(W_));
+ fprintf(hp_file, "VOID\t%lu\n", (unsigned long)(census->void_total) * sizeof(W_));
fprintf(hp_file, "LAG\t%lu\n",
- (census->not_used - census->void_total) * sizeof(W_));
+ (unsigned long)(census->not_used - census->void_total) * sizeof(W_));
fprintf(hp_file, "USE\t%lu\n",
- (census->used - census->drag_total) * sizeof(W_));
+ (unsigned long)(census->used - census->drag_total) * sizeof(W_));
fprintf(hp_file, "INHERENT_USE\t%lu\n",
- census->prim * sizeof(W_));
- fprintf(hp_file, "DRAG\t%lu\n", census->drag_total *
- sizeof(W_));
+ (unsigned long)(census->prim) * sizeof(W_));
+ fprintf(hp_file, "DRAG\t%lu\n",
+ (unsigned long)(census->drag_total) * sizeof(W_));
printSample(rtsFalse, census->time);
return;
}
}
#endif
- fprintf(hp_file, "\t%ld\n", count * sizeof(W_));
+ fprintf(hp_file, "\t%lu\n", (unsigned long)count * sizeof(W_));
}
printSample(rtsFalse, census->time);
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);
case MVAR:
case WEAK:
- case FOREIGN:
case STABLE_NAME:
case MUT_VAR:
prim = rtsTrue;
case MUT_ARR_PTRS:
case MUT_ARR_PTRS_FROZEN:
+ case MUT_ARR_PTRS_FROZEN0:
prim = rtsTrue;
size = mut_arr_ptrs_sizeW((StgMutArrPtrs *)p);
break;
}
#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;
// Now traverse the heap in each generation/step.
if (RtsFlags.GcFlags.generations == 1) {
- heapCensusChain( census, g0s0->to_blocks );
+ heapCensusChain( census, g0s0->blocks );
} else {
for (g = 0; g < RtsFlags.GcFlags.generations; g++) {
for (s = 0; s < generations[g].n_steps; s++) {