Commit c5d2bab5 authored by Ben Gamari's avatar Ben Gamari 🐢

rts: Add a long form flag to enable the non-moving GC

The old flag, `-xn`, was quite cryptic. Here we add `--nonmoving-gc` in
addition.

(cherry picked from commit bcad4ea0)
parent 633e6942
......@@ -346,13 +346,13 @@ performance.
Enable the concurrent mark-and-sweep garbage collector for old generation
collectors. Typically GHC uses a stop-the-world copying garbage collector
for all generations. This can cause long pauses in execution during major
garbage collections. :rts-flag:`-xn` enables the use of a concurrent
mark-and-sweep garbage collector for oldest generation collections.
Under this collection strategy oldest-generation garbage collection
can proceed concurrently with mutation.
garbage collections. :rts-flag:`--nonmoving-gc` enables the use of a
concurrent mark-and-sweep garbage collector for oldest generation
collections. Under this collection strategy oldest-generation garbage
collection can proceed concurrently with mutation.
Note that :rts-flag:`-nonmoving-gc` cannot be used with ``-G1``,
:rts-flag:`profiling <-hc>` nor :rts-flag:`-c`.
Note that :rts-flag:`--nonmoving-gc` cannot be used with ``-G1`` nor
:rts-flag:`-c`.
.. rts-flag:: -xn
......
......@@ -931,6 +931,11 @@ error = true;
printRtsInfo(rtsConfig);
stg_exit(0);
}
else if (strequal("nonmoving-gc",
&rts_argv[arg][2])) {
OPTION_SAFE;
RtsFlags.GcFlags.useNonmoving = true;
}
#if defined(THREADED_RTS)
else if (!strncmp("numa", &rts_argv[arg][2], 4)) {
if (!osBuiltWithNumaSupport()) {
......
Markdown is supported
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