diff options
author | Simon Marlow <marlowsd@gmail.com> | 2008-06-03 07:27:01 +0000 |
---|---|---|
committer | Simon Marlow <marlowsd@gmail.com> | 2008-06-03 07:27:01 +0000 |
commit | 2ac31c7f6e9306024da822674f478db039edb39b (patch) | |
tree | f73a97036180cbc2ea6d48120a94338116049b03 /rts/RtsFlags.c | |
parent | 0f32365ab0808d9c200c60c14d519e9122bf8e54 (diff) | |
download | haskell-2ac31c7f6e9306024da822674f478db039edb39b.tar.gz |
+RTS -N also sets +RTS -g
Diffstat (limited to 'rts/RtsFlags.c')
-rw-r--r-- | rts/RtsFlags.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/rts/RtsFlags.c b/rts/RtsFlags.c index 186ded3357..81bac4e9b6 100644 --- a/rts/RtsFlags.c +++ b/rts/RtsFlags.c @@ -447,7 +447,7 @@ usage_text[] = { "", #endif /* DEBUG */ #if defined(THREADED_RTS) && !defined(NOSMP) -" -N<n> Use <n> OS threads (default: 1)", +" -N<n> Use <n> OS threads (default: 1) (also sets -g)", " -g<n> Use <n> OS threads for GC (default: 1)", " -qm Don't automatically migrate threads between CPUs", " -qw Migrate a thread to the current CPU when it is woken up", @@ -1121,10 +1121,18 @@ error = rtsTrue; if (rts_argv[arg][2] != '\0') { RtsFlags.ParFlags.nNodes = strtol(rts_argv[arg]+2, (char **) NULL, 10); + // set -g at the same time as -N by default + RtsFlags.ParFlags.gcThreads = RtsFlags.ParFlags.nNodes; if (RtsFlags.ParFlags.nNodes <= 0) { errorBelch("bad value for -N"); error = rtsTrue; } +#if defined(PROFILING) + if (RtsFlags.ParFlags.nNodes > 1) { + errorBelch("bad option %s: only -N1 is supported with profiling", rts_argv[arg]); + error = rtsTrue; + } +#endif } ) break; @@ -1137,12 +1145,6 @@ error = rtsTrue; errorBelch("bad value for -g"); error = rtsTrue; } -#if defined(PROFILING) - if (RtsFlags.ParFlags.nNodes > 1) { - errorBelch("bad option %s: only -N1 is supported with profiling", rts_argv[arg]); - error = rtsTrue; - } -#endif } ) break; |