X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=rts%2FRtsStartup.c;h=cdb45c60f2ca68c385d0691c8ddfeca9f5e28998;hb=2777940384ce4740954062bedd0f6813698fc72a;hp=8be4044c05176dc6ae119d55b439ff014936e122;hpb=681aad99cb29ce54f72ec2a916fb1aab0fa0fabb;p=ghc-hetmet.git diff --git a/rts/RtsStartup.c b/rts/RtsStartup.c index 8be4044..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 @@ -494,7 +495,7 @@ hs_exit_(rtsBool wait_foreign) #endif #if defined(mingw32_HOST_OS) && !defined(THREADED_RTS) - shutdownAsyncIO(); + shutdownAsyncIO(wait_foreign); #endif /* free hash table storage */