diff options
author | Simon Marlow <simonmar@microsoft.com> | 2008-02-28 11:16:31 +0000 |
---|---|---|
committer | Simon Marlow <simonmar@microsoft.com> | 2008-02-28 11:16:31 +0000 |
commit | 50c4d03919a9d5c37c14004e964083251f655e93 (patch) | |
tree | 418b71a3c1f657e85e52c85d3b26767b177652b6 /rts/RtsStartup.c | |
parent | 210ca9c013a9cd193a78c1590e3f2ec4041f4858 (diff) | |
download | haskell-50c4d03919a9d5c37c14004e964083251f655e93.tar.gz |
Enable -prof -threaded (#886)
It turns out that -prof -threaded works (modulo some small changes),
because all the data structures used in profiling are only accessed by
one thread at a time, at long as we don't use +RTS -N2 or higher. So
this patch enables the use of -prof -threaded, but an error is given
if you ask for more than one CPU with +RTS -N.
Diffstat (limited to 'rts/RtsStartup.c')
-rw-r--r-- | rts/RtsStartup.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/rts/RtsStartup.c b/rts/RtsStartup.c index 4f84468b0a..4f42823d4a 100644 --- a/rts/RtsStartup.c +++ b/rts/RtsStartup.c @@ -281,10 +281,6 @@ hs_init(int *argc, char **argv[]) x86_init_fpu(); #endif -#if defined(THREADED_RTS) - ioManagerStart(); -#endif - /* Record initialization times */ stat_endInit(); } @@ -360,6 +356,11 @@ hs_add_root(void (*init_root)(void)) // This must be done after module initialisation. // ToDo: make this work in the presence of multiple hs_add_root()s. initProfiling2(); + + // ditto. +#if defined(THREADED_RTS) + ioManagerStart(); +#endif } /* ---------------------------------------------------------------------------- |