X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=rts%2FRtsStartup.c;h=7dce06e640147c7d95667414988b45ecbb1fceb2;hb=0598a001b9d852a044a49f8fb6ab1a6b02a77d9e;hp=85b1c020fb0f31ac14ba5c7ee121f56ca5a79541;hpb=4cc37e5758909aaec9ede20604ec4f01c04b54ea;p=ghc-hetmet.git diff --git a/rts/RtsStartup.c b/rts/RtsStartup.c index 85b1c02..7dce06e 100644 --- a/rts/RtsStartup.c +++ b/rts/RtsStartup.c @@ -38,8 +38,9 @@ #include "FrontPanel.h" #endif -#if defined(PROFILING) || defined(DEBUG) # include "Profiling.h" + +#if defined(PROFILING) # include "ProfHeap.h" # include "RetainerProfile.h" #endif @@ -212,9 +213,6 @@ hs_init(int *argc, char **argv[]) synchroniseSystem(); // calls initParallelSystem etc #endif /* PAR */ - /* Perform initialisation of adjustor thunk layer. */ - initAdjustor(); - /* initialise scheduler data structures (needs to be done before * initStorage()). */ @@ -244,9 +242,7 @@ hs_init(int *argc, char **argv[]) initThreadLabelTable(); #endif -#if defined(PROFILING) || defined(DEBUG) initProfiling1(); -#endif /* start the virtual timer 'subsystem'. */ startTimer(); @@ -353,11 +349,9 @@ hs_add_root(void (*init_root)(void)) startupHpc(); -#if defined(PROFILING) || defined(DEBUG) // This must be done after module initialisation. // ToDo: make this work in the presence of multiple hs_add_root()s. initProfiling2(); -#endif } /* ----------------------------------------------------------------------------- @@ -455,18 +449,13 @@ hs_exit(void) /* free the stable pointer table */ exitStablePtrTable(); -#if defined(PROFILING) || defined(DEBUG) freeProfiling1(); -#endif #if defined(DEBUG) /* free the thread label table */ freeThreadLabelTable(); #endif - /* free hash table storage */ - exitHashTable(); - #ifdef RTS_GTK_FRONTPANEL if (RtsFlags.GcFlags.frontpanel) { stopFrontPanel(); @@ -477,9 +466,7 @@ hs_exit(void) reportCCSProfiling(); #endif -#if defined(PROFILING) || defined(DEBUG) endProfiling(); -#endif #ifdef PROFILING // Originally, this was in report_ccs_profiling(). Now, retainer @@ -496,6 +483,9 @@ hs_exit(void) shutdownAsyncIO(); #endif + /* free hash table storage */ + exitHashTable(); + // Finally, free all our storage freeStorage();