diff options
author | Simon Marlow <marlowsd@gmail.com> | 2009-09-18 11:46:31 +0000 |
---|---|---|
committer | Simon Marlow <marlowsd@gmail.com> | 2009-09-18 11:46:31 +0000 |
commit | ba67234542412c2ca6656dbeadb7d225bc94d4b2 (patch) | |
tree | f95c7b89307f3968b43079254feda5122d7d5dc2 /rts/Ticky.c | |
parent | 04eaa2d72ce1474f4b36621363108ed915ace9ef (diff) | |
download | haskell-ba67234542412c2ca6656dbeadb7d225bc94d4b2.tar.gz |
Fix #3439: -debug implies -ticky, and -ticky code links with any RTS
Diffstat (limited to 'rts/Ticky.c')
-rw-r--r-- | rts/Ticky.c | 34 |
1 files changed, 19 insertions, 15 deletions
diff --git a/rts/Ticky.c b/rts/Ticky.c index c874d1a19c..ff700df234 100644 --- a/rts/Ticky.c +++ b/rts/Ticky.c @@ -6,12 +6,29 @@ * Ticky-ticky profiling *-------------------------------------------------------------------------- */ -#if defined(TICKY_TICKY) - #define TICKY_C /* define those variables */ #include "PosixSource.h" #include "Rts.h" +/* Catch-all top-level counter struct. Allocations from CAFs will go + * here. + */ +StgEntCounter top_ct + = { 0, 0, 0, + "TOP", "", + 0, 0, NULL }; + +/* Data structure used in ``registering'' one of these counters. */ + +StgEntCounter *ticky_entry_ctrs = NULL; /* root of list of them */ + +/* We want Haskell code compiled with -ticky to be linkable with any + * version of the RTS, so we have to make sure all the symbols that + * ticky-compiled code may refer to are defined by every RTS. (#3439) + * Hence the #ifdef is here, rather than up above. + */ +#if defined(TICKY_TICKY) + #include "Ticky.h" /* ----------------------------------------------------------------------------- @@ -553,10 +570,6 @@ PrintTickyInfo(void) PR_CTR(GC_WORDS_COPIED_ctr); } -/* Data structure used in ``registering'' one of these counters. */ - -StgEntCounter *ticky_entry_ctrs = NULL; /* root of list of them */ - /* To print out all the registered-counter info: */ static void @@ -585,14 +598,5 @@ printRegisteredCounterInfo (FILE *tf) } } - -/* Catch-all top-level counter struct. Allocations from CAFs will go - * here. - */ -StgEntCounter top_ct - = { 0, 0, 0, - "TOP", "", - 0, 0, NULL }; - #endif /* TICKY_TICKY */ |