summaryrefslogtreecommitdiff
path: root/rts
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2020-06-01 16:50:45 -0400
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-07-18 07:26:41 -0400
commit750a1595ef31cdc335f3bab045b2f19a9c43ff93 (patch)
tree5758c5c5aa97bcc93918e61c1ede8fec6a5600c9 /rts
parentc0979cc53442b3a6202acab9cf164f0a4beea0b7 (diff)
downloadhaskell-750a1595ef31cdc335f3bab045b2f19a9c43ff93.tar.gz
rts: Add --copying-gc flag to reverse effect of --nonmoving-gc
Fixes #18281.
Diffstat (limited to 'rts')
-rw-r--r--rts/RtsFlags.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/rts/RtsFlags.c b/rts/RtsFlags.c
index 3963e6d0d5..e7375a0746 100644
--- a/rts/RtsFlags.c
+++ b/rts/RtsFlags.c
@@ -303,6 +303,12 @@ usage_text[] = {
" -? Prints this message and exits; the program is not executed",
" --info Print information about the RTS used by this program",
"",
+" --nonmoving-gc",
+" Selects the non-moving mark-and-sweep garbage collector to",
+" manage the oldest generation.",
+" --copying-gc",
+" Selects the copying garbage collector to manage all generations.",
+"",
" -K<size> Sets the maximum stack size (default: 80% of the heap)",
" Egs: -K32k -K512k -K8M",
" -ki<size> Sets the initial thread stack size (default 1k) Egs: -ki4k -ki2m",
@@ -967,6 +973,11 @@ error = true;
printRtsInfo(rtsConfig);
stg_exit(0);
}
+ else if (strequal("copying-gc",
+ &rts_argv[arg][2])) {
+ OPTION_SAFE;
+ RtsFlags.GcFlags.useNonmoving = false;
+ }
else if (strequal("nonmoving-gc",
&rts_argv[arg][2])) {
OPTION_SAFE;