Basic heap profile support without -prof
[ghc-hetmet.git] / rts / Proftimer.c
index 3b49915..32e5c56 100644 (file)
@@ -6,8 +6,6 @@
  *
  * ---------------------------------------------------------------------------*/
 
-#if defined (PROFILING)
-
 #include "PosixSource.h"
 
 #include "Rts.h"
@@ -57,9 +55,6 @@ initProfTimer( void )
 {
     performHeapProfile = rtsFalse;
 
-    RtsFlags.ProfFlags.profileIntervalTicks = 
-       RtsFlags.ProfFlags.profileInterval / TICK_MILLISECS;
-
     ticks_to_heap_profile = RtsFlags.ProfFlags.profileIntervalTicks;
 
     startHeapProfTimer();
@@ -69,9 +64,11 @@ initProfTimer( void )
 void
 handleProfTick(void)
 {
+#ifdef PROFILING
     if (do_prof_ticks) {
        CCCS->time_ticks++;
     }
+#endif
 
     if (do_heap_prof_ticks) {
        ticks_to_heap_profile--;
@@ -81,5 +78,3 @@ handleProfTick(void)
        }
     }
 }
-
-#endif /* PROFILING */