summaryrefslogtreecommitdiff
path: root/rts/RtsFlags.c
diff options
context:
space:
mode:
Diffstat (limited to 'rts/RtsFlags.c')
-rw-r--r--rts/RtsFlags.c10
1 files changed, 10 insertions, 0 deletions
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");