Commit 2ac31c7f authored by Simon Marlow's avatar Simon Marlow
Browse files

+RTS -N also sets +RTS -g

parent 0f32365a
......@@ -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;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment