<div dir="ltr"><div>I&#39;m trying to enable some ticky counters for profiling the RTS code (eg in Storage.c:allocate). Much of the code was already in place, but disabled via CPP.</div><div> </div><div>I can enable the counters, but I&#39;m having trouble making them only tick in the debug RTS.</div>

<div> </div><div>Can someone advise regarding the presence/accuracy of, say, the TICKY_TICKY symbol within the $(TOP)/includes/stg/Ticky.h file?</div><div> </div><div>Recap:</div><div> </div><div>  * I use a macro in Storage.c to tick a ticky counter</div>

<div> </div><div>  * The macro is #defined in stg/Ticky.h</div><div> </div><div>  * I&#39;d like the macro definition to be empty unless the Rts build way is DEBUG</div><div> </div><div>  * There&#39;s this TICKY_TICKY symbol already floating around, so that seems like the right symbol to check</div>

<div> </div><div>  * Thus: what do #include in stg/Ticky.h to make TICKY_TICKY accurate wrt to the build way?</div><div> </div><div>Maybe I&#39;m dense at the moment, but trying some of the straight-forward options suggested by <a href="http://hackage.haskell.org/trac/ghc/wiki/Commentary/SourceTree/Includes">http://hackage.haskell.org/trac/ghc/wiki/Commentary/SourceTree/Includes</a> didn&#39;t seem to help.</div>

<div> </div><div>Thanks.</div></div>