[Git][ghc/ghc][wip/T7275] rts: Enforce that mark-region isn't used with -h
Ben Gamari
gitlab at gitlab.haskell.org
Thu Dec 10 18:00:48 UTC 2020
Ben Gamari pushed to branch wip/T7275 at Glasgow Haskell Compiler / GHC
Commits:
decf9ef5 by Ben Gamari at 2020-12-10T12:59:58-05:00
rts: Enforce that mark-region isn't used with -h
As noted in #9666, the mark-region GC is not compatible with heap
profiling. Also add documentation for this flag.
Closes #9666.
- - - - -
2 changed files:
- docs/users_guide/runtime_control.rst
- rts/RtsFlags.c
Changes:
=====================================
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
=====================================
rts/RtsFlags.c
=====================================
@@ -1849,6 +1849,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");
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/decf9ef5f770d0fa95cf35608cfdea25c0520091
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/decf9ef5f770d0fa95cf35608cfdea25c0520091
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20201210/345a4aa3/attachment-0001.html>
More information about the ghc-commits
mailing list