[project @ 2002-12-05 23:49:43 by mthomas]
[ghc-hetmet.git] / ghc / rts / Proftimer.c
index 390dd69..4025395 100644 (file)
@@ -1,5 +1,5 @@
 /* -----------------------------------------------------------------------------
- * $Id: Proftimer.c,v 1.8 2001/11/22 14:25:12 simonmar Exp $
+ * $Id: Proftimer.c,v 1.10 2002/07/18 09:12:34 simonmar Exp $
  *
  * (c) The GHC Team, 1998-1999
  *
@@ -11,6 +11,8 @@
 
 #include "PosixSource.h"
 
+#include <stdio.h>
+
 #include "Rts.h"
 #include "Profiling.h"
 #include "Itimer.h"
@@ -29,17 +31,13 @@ rtsBool performHeapProfile;
 void
 stopProfTimer( void )
 {
-    if (time_profiling) {
-       do_prof_ticks = rtsFalse;
-    }
+    do_prof_ticks = rtsFalse;
 }
 
 void
 startProfTimer( void )
 {
-    if (time_profiling) {
-       do_prof_ticks = rtsTrue;
-    }
+    do_prof_ticks = rtsTrue;
 }
 
 void
@@ -68,13 +66,13 @@ initProfTimer( void )
 
     startHeapProfTimer();
 }
-    
+
 
 void
 handleProfTick(void)
 {
     if (do_prof_ticks) {
-       CCS_TICK(CCCS);
+       CCCS->time_ticks++;
     }
 
     if (do_heap_prof_ticks) {