[project @ 2003-09-08 11:53:14 by simonmar]
[ghc-hetmet.git] / ghc / rts / ProfHeap.c
index fea4abc..19beb9c 100644 (file)
@@ -1,5 +1,5 @@
 /* -----------------------------------------------------------------------------
- * $Id: ProfHeap.c,v 1.44 2003/03/18 14:36:56 simonmar Exp $
+ * $Id: ProfHeap.c,v 1.47 2003/08/22 22:24:12 sof Exp $
  *
  * (c) The GHC Team, 1998-2003
  *
@@ -407,7 +407,7 @@ initHeapProfiling(void)
 
     initEra( &censuses[era] );
 
-    fprintf(hp_file, "JOB \"%s", prog_argv[0]);
+    fprintf(hp_file, "JOB \"%s", prog_name);
 
 #ifdef PROFILING
     {
@@ -432,7 +432,7 @@ initHeapProfiling(void)
     fprintf(hp_file, "END_SAMPLE 0.00\n");
 
 #ifdef DEBUG_HEAP_PROF
-    DEBUG_LoadSymbols(prog_argv[0]);
+    DEBUG_LoadSymbols(prog_name);
 #endif
 
 #ifdef PROFILING
@@ -836,6 +836,7 @@ heapCensusChain( Census *census, bdescr *bd )
            case FUN:
            case THUNK:
            case IND_PERM:
+           case IND_OLDGEN:
            case IND_OLDGEN_PERM:
            case CAF_BLACKHOLE:
            case SE_CAF_BLACKHOLE:
@@ -861,6 +862,10 @@ heapCensusChain( Census *census, bdescr *bd )
                break;
                
            case BCO:
+               prim = rtsTrue;
+               size = bco_sizeW((StgBCO *)p);
+               break;
+
            case MVAR:
            case WEAK:
            case FOREIGN: