X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=rts%2FRtsStartup.c;h=cdb45c60f2ca68c385d0691c8ddfeca9f5e28998;hb=eb64777602e77588cb781865f742fa23fad06d08;hp=4f5b1c77a320cd2ccbc3270417f81d91a9a27228;hpb=eb5791fe867f6441d270344298678f45ed4a75e4;p=ghc-hetmet.git diff --git a/rts/RtsStartup.c b/rts/RtsStartup.c index 4f5b1c7..cdb45c6 100644 --- a/rts/RtsStartup.c +++ b/rts/RtsStartup.c @@ -246,6 +246,7 @@ hs_init(int *argc, char **argv[]) initProfiling1(); /* start the virtual timer 'subsystem'. */ + initTimer(); startTimer(); /* Initialise the stats department */ @@ -409,6 +410,7 @@ hs_exit_(rtsBool wait_foreign) /* stop the ticker */ stopTimer(); + exitTimer(); /* reset the standard file descriptors to blocking mode */ resetNonBlockingFd(0); @@ -463,8 +465,6 @@ hs_exit_(rtsBool wait_foreign) /* free the stable pointer table */ exitStablePtrTable(); - freeProfiling1(); - #if defined(DEBUG) /* free the thread label table */ freeThreadLabelTable(); @@ -481,6 +481,7 @@ hs_exit_(rtsBool wait_foreign) #endif endProfiling(); + freeProfiling1(); #ifdef PROFILING // Originally, this was in report_ccs_profiling(). Now, retainer