[project @ 2005-04-05 12:19:54 by simonmar]
[ghc-hetmet.git] / ghc / rts / ProfHeap.c
index dab6057..482895f 100644 (file)
@@ -1,5 +1,4 @@
 /* -----------------------------------------------------------------------------
- * $Id: ProfHeap.c,v 1.54 2004/09/03 15:28:35 simonmar Exp $
  *
  * (c) The GHC Team, 1998-2003
  *
@@ -47,7 +46,7 @@
  * When era reaches max_era, the profiling stops because a closure can
  * store only up to (max_era - 1) as its creation or last use time.
  * -------------------------------------------------------------------------- */
-nat era;
+unsigned int era;
 static nat max_era;
 
 /* -----------------------------------------------------------------------------
@@ -151,7 +150,6 @@ static char *type_names[] = {
     , "STOP_FRAME"
 
     , "BLACKHOLE"
-    , "BLACKHOLE_BQ"
     , "MVAR"
 
     , "ARR_WORDS"
@@ -229,7 +227,7 @@ doingRetainerProfiling( void )
     return (RtsFlags.ProfFlags.doHeapProfile == HEAP_BY_RETAINER
            || RtsFlags.ProfFlags.retainerSelector != NULL);
 }
-#endif // PROFILING
+#endif /* PROFILING */
 
 // Precesses a closure 'c' being destroyed whose size is 'size'.
 // Make sure that LDV_recordDead() is not invoked on 'inherently used' closures
@@ -342,7 +340,7 @@ nextEra( void )
                                       "nextEra");
        }
     }
-#endif // PROFILING
+#endif /* PROFILING */
 
     initEra( &censuses[era] );
 }
@@ -531,7 +529,7 @@ fprint_ccs(FILE *fp, CostCentreStack *ccs, nat max_length)
        return;
     }
 
-    fprintf(fp, "(%d)", ccs->ccsID);
+    fprintf(fp, "(%ld)", ccs->ccsID);
 
     p = buf;
     buf_end = buf + max_length + 1;
@@ -561,7 +559,7 @@ fprint_ccs(FILE *fp, CostCentreStack *ccs, nat max_length)
     }
     fprintf(fp, "%s", buf);
 }
-#endif // PROFILING
+#endif /* PROFILING */
 
 rtsBool
 strMatchesSelector( char* str, char* sel )
@@ -746,14 +744,14 @@ dumpCensus( Census *census )
 
 #ifdef PROFILING
     if (RtsFlags.ProfFlags.doHeapProfile == HEAP_BY_LDV) {
-       fprintf(hp_file, "VOID\t%u\n", census->void_total * sizeof(W_));
-       fprintf(hp_file, "LAG\t%u\n", 
+       fprintf(hp_file, "VOID\t%lu\n", census->void_total * sizeof(W_));
+       fprintf(hp_file, "LAG\t%lu\n", 
                (census->not_used - census->void_total) * sizeof(W_));
-       fprintf(hp_file, "USE\t%u\n", 
+       fprintf(hp_file, "USE\t%lu\n", 
                (census->used - census->drag_total) * sizeof(W_));
-       fprintf(hp_file, "INHERENT_USE\t%u\n", 
+       fprintf(hp_file, "INHERENT_USE\t%lu\n", 
                census->prim * sizeof(W_));
-       fprintf(hp_file, "DRAG\t%u\n", census->drag_total *
+       fprintf(hp_file, "DRAG\t%lu\n", census->drag_total *
                sizeof(W_));
        printSample(rtsFalse, census->time);
        return;
@@ -832,7 +830,7 @@ dumpCensus( Census *census )
        }
 #endif
 
-       fprintf(hp_file, "\t%d\n", count * sizeof(W_));
+       fprintf(hp_file, "\t%ld\n", count * sizeof(W_));
     }
 
     printSample(rtsFalse, census->time);
@@ -879,7 +877,6 @@ heapCensusChain( Census *census, bdescr *bd )
            case SE_CAF_BLACKHOLE:
            case SE_BLACKHOLE:
            case BLACKHOLE:
-           case BLACKHOLE_BQ:
            case CONSTR_INTLIKE:
            case CONSTR_CHARLIKE:
            case FUN_1_0:
@@ -908,7 +905,6 @@ heapCensusChain( Census *census, bdescr *bd )
            case FOREIGN:
            case STABLE_NAME:
            case MUT_VAR:
-           case MUT_CONS:
                prim = rtsTrue;
                size = sizeW_fromITBL(info);
                break;