*
* ---------------------------------------------------------------------------*/
-#if defined (PROFILING)
-
#include "PosixSource.h"
-
#include "Rts.h"
+
#include "Profiling.h"
-#include "Timer.h"
#include "Proftimer.h"
-#include "RtsFlags.h"
+#ifdef PROFILING
static rtsBool do_prof_ticks = rtsFalse; // enable profiling ticks
+#endif
+
static rtsBool do_heap_prof_ticks = rtsFalse; // enable heap profiling ticks
// Number of ticks until next heap census
// Time for a heap profile on the next context switch
rtsBool performHeapProfile;
+#ifdef PROFILING
+
void
stopProfTimer( void )
{
do_prof_ticks = rtsTrue;
}
+#endif
+
void
stopHeapProfTimer( void )
{
void
handleProfTick(void)
{
+#ifdef PROFILING
if (do_prof_ticks) {
CCCS->time_ticks++;
}
+#endif
if (do_heap_prof_ticks) {
ticks_to_heap_profile--;
}
}
}
-
-#endif /* PROFILING */