summaryrefslogtreecommitdiff
path: root/rts/Profiling.h
diff options
context:
space:
mode:
authorÖmer Sinan Ağacan <omeragacan@gmail.com>2019-01-10 12:42:04 +0300
committerÖmer Sinan Ağacan <omeragacan@gmail.com>2019-01-10 12:42:04 +0300
commit82d1a88dec216d761b17252ede760da5c566007f (patch)
treef925f9294d73682ffccda2ea77374a8ceb685c8e /rts/Profiling.h
parent6486c6e49c53e75f37ed732b38c5be7ae64785e8 (diff)
downloadhaskell-82d1a88dec216d761b17252ede760da5c566007f.tar.gz
Implement a sanity check for CCS fields in profiling builds
This helped me debug one of the bugs in #15508. I'm not sure if this is a good idea, but it worked for me, so wanted to submit this as a MR.
Diffstat (limited to 'rts/Profiling.h')
-rw-r--r--rts/Profiling.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/rts/Profiling.h b/rts/Profiling.h
index 45725e5631..c692c22b5e 100644
--- a/rts/Profiling.h
+++ b/rts/Profiling.h
@@ -13,6 +13,10 @@
#include "BeginPrivate.h"
#include "Rts.h"
+#if defined(DEBUG)
+#include "Arena.h"
+#endif
+
#if defined(PROFILING)
#define PROFILING_ONLY(s) s
#else
@@ -46,6 +50,8 @@ bool ignoreCCS (CostCentreStack const *ccs);
bool ignoreCC (CostCentre const *cc);
#if defined(DEBUG)
+extern Arena *prof_arena;
+
void debugCCS( CostCentreStack *ccs );
#endif