From 2ee4f36c779674f7237d730460ca83aec9a6808a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Gr=C3=B6ber?= Date: Fri, 10 Apr 2020 02:40:32 +0200 Subject: Cleanup OVERWRITING_CLOSURE logic The code is just more confusing than it needs to be. We don't need to mix the threaded check with the ldv profiling check since ldv's init already checks for this. Hence they can be two separate checks. Taking the sanity checking into account is also cleaner via DebugFlags.sanity. No need for checking the DEBUG define. The ZERO_SLOP_FOR_LDV_PROF and ZERO_SLOP_FOR_SANITY_CHECK definitions the old code had also make things a lot more opaque IMO so I removed those. --- rts/sm/Storage.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'rts/sm/Storage.c') diff --git a/rts/sm/Storage.c b/rts/sm/Storage.c index a73228dce6..b47afaf7df 100644 --- a/rts/sm/Storage.c +++ b/rts/sm/Storage.c @@ -948,7 +948,7 @@ accountAllocation(Capability *cap, W_ n) * * When profiling we zero: * - Pinned object alignment slop, see MEMSET_IF_PROFILING_W in allocatePinned. - * - Shrunk array slop, see OVERWRITING_MUTABLE_CLOSURE. + * - Shrunk array slop, see OVERWRITING_CLOSURE_MUTABLE. * * When performing LDV profiling or using a (single threaded) debug RTS we zero * slop even when overwriting immutable closures, see Note [zeroing slop when -- cgit v1.2.1