X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=rts%2FRtsStartup.c;h=a363c133f40908ddc735ff9de4640d1c2c638a34;hb=c6eadadbefe2ec5709e9d31893f79c4ff78754b4;hp=85b1c020fb0f31ac14ba5c7ee121f56ca5a79541;hpb=4cc37e5758909aaec9ede20604ec4f01c04b54ea;p=ghc-hetmet.git diff --git a/rts/RtsStartup.c b/rts/RtsStartup.c index 85b1c02..a363c13 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 @@ -198,6 +199,7 @@ hs_init(int *argc, char **argv[]) /* Parse the flags, separating the RTS flags from the programs args */ if (argc != NULL && argv != NULL) { + setFullProgArgv(*argc,*argv); setupRtsFlags(argc, *argv, &rts_argc, rts_argv); setProgArgv(*argc,*argv); } @@ -212,9 +214,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 +243,7 @@ hs_init(int *argc, char **argv[]) initThreadLabelTable(); #endif -#if defined(PROFILING) || defined(DEBUG) initProfiling1(); -#endif /* start the virtual timer 'subsystem'. */ startTimer(); @@ -353,11 +350,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 +450,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 +467,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 +484,9 @@ hs_exit(void) shutdownAsyncIO(); #endif + /* free hash table storage */ + exitHashTable(); + // Finally, free all our storage freeStorage();