diff options
-rw-r--r-- | docs/users_guide/runtime_control.rst | 11 | ||||
-rw-r--r-- | rts/RtsFlags.c | 10 |
2 files changed, 21 insertions, 0 deletions
diff --git a/docs/users_guide/runtime_control.rst b/docs/users_guide/runtime_control.rst index 49dc6a5441..81357b9120 100644 --- a/docs/users_guide/runtime_control.rst +++ b/docs/users_guide/runtime_control.rst @@ -411,6 +411,17 @@ performance. Note that :rts-flag:`--nonmoving-gc` cannot be used with ``-G1``, :rts-flag:`profiling <-hc>` nor :rts-flag:`-c`. +.. rts-flag:: -w + + :default: off + :since: a long time ago + :reverse: none + + Uses a mark-region garbage collection strategy for the oldest-generation heap. + Note that this cannot be used in conjunction with heap profiling + (:rts-flag:`-hT`) unless linked against the profiling runtime system with + :ghc-flag:`-prof`. + .. rts-flag:: -xn :default: off diff --git a/rts/RtsFlags.c b/rts/RtsFlags.c index b0f3ac4475..95656c3da6 100644 --- a/rts/RtsFlags.c +++ b/rts/RtsFlags.c @@ -1850,6 +1850,16 @@ static void normaliseRtsOpts (void) barf("The non-moving collector doesn't support -G1"); } +#if !defined(PROFILING) && !defined(DEBUG) + // The mark-region collector is incompatible with heap census unless + // we zero slop of blackhole'd thunks, which doesn't happen in the + // vanilla way. See #9666. + if (RtsFlags.ProfFlags.doHeapProfile && RtsFlags.GcFlags.sweep) { + barf("The mark-region collector can only be used with profiling\n" + "when linked against the profiled RTS."); + } +#endif + if (RtsFlags.ProfFlags.doHeapProfile != NO_HEAP_PROFILING && RtsFlags.GcFlags.useNonmoving) { barf("The non-moving collector doesn't support profiling"); |