/* -----------------------------------------------------------------------------
- * $Id: ProfHeap.c,v 1.46 2003/05/16 14:16:53 simonmar Exp $
+ * $Id: ProfHeap.c,v 1.48 2003/09/23 15:38:36 simonmar Exp $
*
* (c) The GHC Team, 1998-2003
*
initEra( &censuses[era] );
- fprintf(hp_file, "JOB \"%s", prog_argv[0]);
+ fprintf(hp_file, "JOB \"%s", prog_name);
#ifdef PROFILING
{
fprintf(hp_file, "END_SAMPLE 0.00\n");
#ifdef DEBUG_HEAP_PROF
- DEBUG_LoadSymbols(prog_argv[0]);
+ DEBUG_LoadSymbols(prog_name);
#endif
#ifdef PROFILING
rtsBool prim;
for (; bd != NULL; bd = bd->link) {
+
+ // HACK: ignore pinned blocks, because they contain gaps.
+ // It's not clear exactly what we'd like to do here, since we
+ // can't tell which objects in the block are actually alive.
+ // Perhaps the whole block should be counted as SYSTEM memory.
+ if (bd->flags & BF_PINNED) {
+ continue;
+ }
+
p = bd->start;
while (p < bd->free) {
info = get_itbl((StgClosure *)p);