summaryrefslogtreecommitdiff
path: root/includes/stg/Ticky.h
diff options
context:
space:
mode:
authorsimonpj@microsoft.com <unknown>2009-10-08 16:27:52 +0000
committersimonpj@microsoft.com <unknown>2009-10-08 16:27:52 +0000
commitb3239bef5d0f99e914c48d59c05c38effaa7c563 (patch)
tree951af5da06e8bf0e0daeb3acbbac48cf06af9957 /includes/stg/Ticky.h
parent524c609b6d8d220b03640dc71a209530bf2ed280 (diff)
downloadhaskell-b3239bef5d0f99e914c48d59c05c38effaa7c563.tar.gz
Make ghci work with libraries compiled with -ticky
This is a follow up to the patch tha fixes Trac #3439. We had forgotten the dynamic linker, which needs to know all these ticky symbols too.
Diffstat (limited to 'includes/stg/Ticky.h')
-rw-r--r--includes/stg/Ticky.h25
1 files changed, 19 insertions, 6 deletions
diff --git a/includes/stg/Ticky.h b/includes/stg/Ticky.h
index e173aa79be..2ede8ebdf9 100644
--- a/includes/stg/Ticky.h
+++ b/includes/stg/Ticky.h
@@ -17,11 +17,26 @@
/* These should probably be automatically generated in order to
keep them consistent with the macros that use them (which are
- defined in Cmm.h. */
+ defined in Cmm.h) */
-/* same trick as in the former StgTicky.h: recycle the same declarations
- for both extern decls (which are included everywhere)
- and initializations (which only happen once) */
+/* Here are all the counter declarations: */
+/* If you change this list, make the corresponding change
+ in RTS_TICKY_SYMBOLS in rts/Linker.c */
+
+/* These two are explicitly declared in rts/Ticky.c, and
+ hence should not be extern'd except when using this header
+ file from STG code; hence IN_STG_CODE */
+
+#if IN_STG_CODE
+extern W_ ticky_entry_ctrs[];
+extern W_ top_ct[];
+#endif
+
+/* The rest are not explicity declared in rts/Ticky.c. Instead
+ we use the same trick as in the former StgTicky.h: recycle the
+ same declarations for both extern decls (which are included everywhere)
+ and initializations (which only happen once)
+ TICKY_C is defined only in rts/Ticky.c */
#ifdef TICKY_C
#define INIT(ializer) = ializer
#define EXTERN
@@ -30,8 +45,6 @@
#define EXTERN extern
#endif
-/* Here are all the counter declarations: */
-
EXTERN StgInt ENT_VIA_NODE_ctr INIT(0);
EXTERN StgInt ENT_STATIC_THK_ctr INIT(0);
EXTERN StgInt ENT_DYN_THK_ctr INIT(0);