X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Frts%2FProftimer.c;h=ae63670418897915dba3940c75ccc6481bbdc8c9;hb=7385dd9fa7f062997a2860ea13e2c268e0783c40;hp=ad5bbd92072c7235f9b955d5c0784e1a71ab4e5f;hpb=c6ab4bfa09886be3bfff4aa747af2f1c8e348a1f;p=ghc-hetmet.git diff --git a/ghc/rts/Proftimer.c b/ghc/rts/Proftimer.c index ad5bbd9..ae63670 100644 --- a/ghc/rts/Proftimer.c +++ b/ghc/rts/Proftimer.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: Proftimer.c,v 1.5 1999/08/25 16:11:49 simonmar Exp $ + * $Id: Proftimer.c,v 1.6 2000/04/03 15:54:49 simonmar Exp $ * * (c) The GHC Team, 1998-1999 * @@ -7,37 +7,36 @@ * * ---------------------------------------------------------------------------*/ -/* Only have cost centres etc if PROFILING defined */ - #if defined (PROFILING) #include "Rts.h" -#include "ProfRts.h" +#include "Profiling.h" #include "Itimer.h" #include "Proftimer.h" -nat current_interval = 1; /* Current interval number -- - stored in AGE */ - -nat interval_ticks = DEFAULT_INTERVAL; /* No of ticks in an interval */ - -nat previous_ticks = 0; /* ticks in previous intervals */ -nat current_ticks = 0; /* ticks in current interval */ +rtsBool do_prof_ticks = rtsFalse; /* enable profiling ticks */ void stopProfTimer(void) { /* Stops time profile */ - if (time_profiling) { - do_prof_ticks = rtsFalse; - } + if (time_profiling) { + do_prof_ticks = rtsFalse; + } }; void startProfTimer(void) { /* Starts time profile */ - if (time_profiling) { - do_prof_ticks = rtsTrue; - } + if (time_profiling) { + do_prof_ticks = rtsTrue; + } }; +void +handleProfTick(void) +{ + if (do_prof_ticks) { + CCS_TICK(CCCS); + } +} #endif /* PROFILING */