diff options
author | Ben Gamari <ben@smart-cactus.org> | 2020-12-10 12:56:37 -0500 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2020-12-20 21:03:32 -0500 |
commit | f266c813d41472a7b04531facfd9dbe52b878f40 (patch) | |
tree | f9c18002924c98d51b494228924f9027f3827960 /rts/RtsFlags.c | |
parent | 853f35cf8d710fc8f162d00eddead590800a765c (diff) | |
download | haskell-wip/T7275.tar.gz |
rts: Enforce that mark-region isn't used with -hwip/T7275
As noted in #9666, the mark-region GC is not compatible with heap
profiling. Also add documentation for this flag.
Closes #9666.
Diffstat (limited to 'rts/RtsFlags.c')
-rw-r--r-- | rts/RtsFlags.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/rts/RtsFlags.c b/rts/RtsFlags.c index b23b19752b..14739b3d53 100644 --- a/rts/RtsFlags.c +++ b/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"); |