/* -----------------------------------------------------------------------------
- * $Id: ProfHeap.c,v 1.22 2001/07/19 07:28:00 andy Exp $
+ * $Id: ProfHeap.c,v 1.25 2001/08/14 13:40:09 sewardj Exp $
*
* (c) The GHC Team, 1998-2000
*
#if defined(PROFILING) || defined(DEBUG_HEAP_PROF)
+#include "PosixSource.h"
#include "Rts.h"
#include "RtsUtils.h"
#include "RtsFlags.h"
nat i;
for (i = 0; i < SYMBOL_HASH_SIZE; i++) {
if (symbol_hash[i].data > 0) {
- fprintf(fp, " %s %d\n", symbol_hash[i].name, symbol_hash[i].data);
+ fprintf(fp, " %s %lu\n", symbol_hash[i].name, (unsigned long)symbol_hash[i].data);
}
}
}
for (i = 0; i < N_CLOSURE_TYPES; i++) {
if (closure_types[i]) {
- fprintf(fp, " %s %d\n", type_names[i], closure_types[i]);
+ fprintf(fp, " %s %lu\n", type_names[i], (unsigned long)closure_types[i]);
}
}
}
StgDouble time;
nat size;
StgPtr p;
+#ifdef PROFILING
nat elapsed;
+#endif
#ifdef DEBUG_HEAP_PROF
switch (RtsFlags.ProfFlags.doHeapProfile) {
/* Only do heap profiling in a two-space heap */
ASSERT(RtsFlags.GcFlags.generations == 1);
- bd = g0s0->to_space;
+ bd = g0s0->to_blocks;
fprintf(hp_file, "BEGIN_SAMPLE %0.2f\n", time);