summaryrefslogtreecommitdiff
path: root/includes/Rts.h
diff options
context:
space:
mode:
authorMatthew Pickering <matthewtpickering@gmail.com>2019-06-06 14:03:50 +0100
committerMarge Bot <ben+marge-bot@smart-cactus.org>2019-06-27 10:42:29 -0400
commita586b33f8e8ad60b5c5ef3501c89e9b71794bbed (patch)
treec1c23bc071458a63769433adecc0e072cc6adc64 /includes/Rts.h
parent1c4f18d071dcd76d068ae06d43d7c5048b57d980 (diff)
downloadhaskell-a586b33f8e8ad60b5c5ef3501c89e9b71794bbed.tar.gz
rts: Correct handling of LARGE ARR_WORDS in LDV profiler
This implements the correct fix for #11627 by skipping over the slop (which is zeroed) rather than adding special case logic for LARGE ARR_WORDS which runs the risk of not performing a correct census by ignoring any subsequent blocks. This approach implements similar logic to that in Sanity.c
Diffstat (limited to 'includes/Rts.h')
-rw-r--r--includes/Rts.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/includes/Rts.h b/includes/Rts.h
index f1f8351298..dd60726c39 100644
--- a/includes/Rts.h
+++ b/includes/Rts.h
@@ -147,6 +147,14 @@ void _assertFail(const char *filename, unsigned int linenum)
#define USED_IF_NOT_THREADS
#endif
+#if defined(PROFILING)
+#define USED_IF_PROFILING
+#define USED_IF_NOT_PROFILING STG_UNUSED
+#else
+#define USED_IF_PROFILING STG_UNUSED
+#define USED_IF_NOT_PROFILING
+#endif
+
#define FMT_SizeT "zu"
#define FMT_HexSizeT "zx"