diff options
author | Ben Gamari <ben@smart-cactus.org> | 2019-10-29 18:51:12 -0400 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2019-10-30 22:00:19 -0400 |
commit | bcad4ea0ecb792d966e6b131e94dff33287d0e84 (patch) | |
tree | bf0f9c36b670020d8c12301f340aacf8421e9fe4 | |
parent | 72f7ac9ad66b886f4ea9569446e20aa4f97890e4 (diff) | |
download | haskell-wip/gc/longer-flag.tar.gz |
rts: Add a long form flag to enable the non-moving GCwip/gc/longer-flag
The old flag, `-xn`, was quite cryptic. Here we add `--nonmoving-gc` in
addition.
-rw-r--r-- | docs/users_guide/runtime_control.rst | 20 | ||||
-rw-r--r-- | rts/RtsFlags.c | 5 |
2 files changed, 19 insertions, 6 deletions
diff --git a/docs/users_guide/runtime_control.rst b/docs/users_guide/runtime_control.rst index 049ba13839..a68b1bd266 100644 --- a/docs/users_guide/runtime_control.rst +++ b/docs/users_guide/runtime_control.rst @@ -313,7 +313,7 @@ collection. Hopefully, you won't need any of these in normal operation, but there are several things that can be tweaked for maximum performance. -.. rts-flag:: -xn +.. rts-flag:: --nonmoving-gc :default: off :since: 8.10.1 @@ -324,12 +324,20 @@ 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`` nor + :rts-flag:`-c`. + +.. rts-flag:: -xn + + :default: off + :since: 8.10.1 - Note that :rts-flag:`-xn` cannot be used with ``-G1`` nor :rts-flag:`-c`. + An alias for :rts-flag:`--nonmoving-gc` .. rts-flag:: -A ⟨size⟩ diff --git a/rts/RtsFlags.c b/rts/RtsFlags.c index 0e28b980ac..e284f065de 100644 --- a/rts/RtsFlags.c +++ b/rts/RtsFlags.c @@ -925,6 +925,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()) { |