/* -----------------------------------------------------------------------------
- * $Id: ProfHeap.c,v 1.54 2004/09/03 15:28:35 simonmar Exp $
*
* (c) The GHC Team, 1998-2003
*
* 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;
/* -----------------------------------------------------------------------------
, "STOP_FRAME"
, "BLACKHOLE"
- , "BLACKHOLE_BQ"
, "MVAR"
, "ARR_WORDS"
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
"nextEra");
}
}
-#endif // PROFILING
+#endif /* PROFILING */
initEra( &censuses[era] );
}
return;
}
- fprintf(fp, "(%d)", ccs->ccsID);
+ fprintf(fp, "(%ld)", ccs->ccsID);
p = buf;
buf_end = buf + max_length + 1;
}
fprintf(fp, "%s", buf);
}
-#endif // PROFILING
+#endif /* PROFILING */
rtsBool
strMatchesSelector( char* str, char* sel )
#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;
}
#endif
- fprintf(hp_file, "\t%d\n", count * sizeof(W_));
+ fprintf(hp_file, "\t%ld\n", count * sizeof(W_));
}
printSample(rtsFalse, census->time);
case SE_CAF_BLACKHOLE:
case SE_BLACKHOLE:
case BLACKHOLE:
- case BLACKHOLE_BQ:
case CONSTR_INTLIKE:
case CONSTR_CHARLIKE:
case FUN_1_0:
case FOREIGN:
case STABLE_NAME:
case MUT_VAR:
- case MUT_CONS:
prim = rtsTrue;
size = sizeW_fromITBL(info);
break;