projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Make TH capable of quoting GADT declarations (Trac #5217)
[ghc-hetmet.git]
/
rts
/
Proftimer.c
diff --git
a/rts/Proftimer.c
b/rts/Proftimer.c
index
ce20c49
..
dfcc709
100644
(file)
--- a/
rts/Proftimer.c
+++ b/
rts/Proftimer.c
@@
-6,17
+6,16
@@
*
* ---------------------------------------------------------------------------*/
*
* ---------------------------------------------------------------------------*/
-#if defined (PROFILING)
-
#include "PosixSource.h"
#include "PosixSource.h"
-
#include "Rts.h"
#include "Rts.h"
+
#include "Profiling.h"
#include "Profiling.h"
-#include "Timer.h"
#include "Proftimer.h"
#include "Proftimer.h"
-#include "RtsFlags.h"
+#ifdef PROFILING
static rtsBool do_prof_ticks = rtsFalse; // enable profiling ticks
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
static rtsBool do_heap_prof_ticks = rtsFalse; // enable heap profiling ticks
// Number of ticks until next heap census
@@
-25,6
+24,8
@@
static int ticks_to_heap_profile;
// Time for a heap profile on the next context switch
rtsBool performHeapProfile;
// Time for a heap profile on the next context switch
rtsBool performHeapProfile;
+#ifdef PROFILING
+
void
stopProfTimer( void )
{
void
stopProfTimer( void )
{
@@
-37,6
+38,8
@@
startProfTimer( void )
do_prof_ticks = rtsTrue;
}
do_prof_ticks = rtsTrue;
}
+#endif
+
void
stopHeapProfTimer( void )
{
void
stopHeapProfTimer( void )
{
@@
-66,9
+69,11
@@
initProfTimer( void )
void
handleProfTick(void)
{
void
handleProfTick(void)
{
+#ifdef PROFILING
if (do_prof_ticks) {
CCCS->time_ticks++;
}
if (do_prof_ticks) {
CCCS->time_ticks++;
}
+#endif
if (do_heap_prof_ticks) {
ticks_to_heap_profile--;
if (do_heap_prof_ticks) {
ticks_to_heap_profile--;
@@
-78,5
+83,3
@@
handleProfTick(void)
}
}
}
}
}
}
-
-#endif /* PROFILING */