X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=rts%2FProftimer.c;h=dfcc7096258ef06372eb016985a3c175f29dbb86;hb=d108044bef62f6a0d579c92ced5e8188f72edc2d;hp=ce20c491af2705c395b782d322068d01893eb0f6;hpb=93db1991b5cacf8357493a2e17fbbfb485f3205b;p=ghc-hetmet.git diff --git a/rts/Proftimer.c b/rts/Proftimer.c index ce20c49..dfcc709 100644 --- a/rts/Proftimer.c +++ b/rts/Proftimer.c @@ -6,17 +6,16 @@ * * ---------------------------------------------------------------------------*/ -#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 @@ -25,6 +24,8 @@ static int ticks_to_heap_profile; // Time for a heap profile on the next context switch rtsBool performHeapProfile; +#ifdef PROFILING + void stopProfTimer( void ) { @@ -37,6 +38,8 @@ startProfTimer( void ) do_prof_ticks = rtsTrue; } +#endif + void stopHeapProfTimer( void ) { @@ -66,9 +69,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--; @@ -78,5 +83,3 @@ handleProfTick(void) } } } - -#endif /* PROFILING */