summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
Diffstat (limited to 'includes')
-rw-r--r--includes/CodeGen.Platform.hs8
-rw-r--r--includes/Rts.h2
-rw-r--r--includes/ghc.mk17
-rw-r--r--includes/rts/Constants.h27
-rw-r--r--includes/rts/Globals.h1
-rw-r--r--includes/rts/PrimFloat.h2
-rw-r--r--includes/rts/Utils.h5
-rw-r--r--includes/rts/storage/Closures.h14
-rw-r--r--includes/rts/storage/GC.h10
-rw-r--r--includes/rts/storage/SMPClosureOps.h77
-rw-r--r--includes/stg/MachRegs.h32
-rw-r--r--includes/stg/MiscClosures.h11
-rw-r--r--includes/stg/SMP.h9
-rw-r--r--includes/stg/Ticky.h7
14 files changed, 142 insertions, 80 deletions
diff --git a/includes/CodeGen.Platform.hs b/includes/CodeGen.Platform.hs
index beff19601d..8007574b10 100644
--- a/includes/CodeGen.Platform.hs
+++ b/includes/CodeGen.Platform.hs
@@ -381,7 +381,7 @@ activeStgRegs = [
#ifdef REG_SpLim
,SpLim
#endif
-#if MAX_REAL_SSE_REG != 0
+#if MAX_REAL_XMM_REG != 0
#ifdef REG_F1
,FloatReg 1
#endif
@@ -436,7 +436,7 @@ activeStgRegs = [
#ifdef REG_XMM6
,XmmReg 6
#endif
-#else /* MAX_REAL_SSE_REG == 0 */
+#else /* MAX_REAL_XMM_REG == 0 */
#ifdef REG_F1
,FloatReg 1
#endif
@@ -473,7 +473,7 @@ activeStgRegs = [
#ifdef REG_D6
,DoubleReg 6
#endif
-#endif /* MAX_REAL_SSE_REG == 0 */
+#endif /* MAX_REAL_XMM_REG == 0 */
]
haveRegBase :: Bool
@@ -587,7 +587,7 @@ globalRegMaybe (DoubleReg 6) =
Just (RealRegSingle REG_D6)
# endif
# endif
-#if MAX_REAL_SSE_REG != 0
+#if MAX_REAL_XMM_REG != 0
globalRegMaybe (XmmReg 1) = Just (RealRegSingle REG_XMM1)
globalRegMaybe (XmmReg 2) = Just (RealRegSingle REG_XMM2)
globalRegMaybe (XmmReg 3) = Just (RealRegSingle REG_XMM3)
diff --git a/includes/Rts.h b/includes/Rts.h
index bea4c47246..122637c465 100644
--- a/includes/Rts.h
+++ b/includes/Rts.h
@@ -203,6 +203,7 @@ INLINE_HEADER Time fsecondsToTime (double t)
#include "rts/SpinLock.h"
#include "rts/Messages.h"
+#include "rts/Threads.h"
/* Storage format definitions */
#include "rts/storage/FunTypes.h"
@@ -230,7 +231,6 @@ INLINE_HEADER Time fsecondsToTime (double t)
#include "rts/Globals.h"
#include "rts/IOManager.h"
#include "rts/Linker.h"
-#include "rts/Threads.h"
#include "rts/Ticky.h"
#include "rts/Timer.h"
#include "rts/Stable.h"
diff --git a/includes/ghc.mk b/includes/ghc.mk
index 6b92d20837..04cc4aae07 100644
--- a/includes/ghc.mk
+++ b/includes/ghc.mk
@@ -85,6 +85,11 @@ ifeq "$(CC_LLVM_BACKEND)" "1"
@echo "#define llvm_CC_FLAVOR 1" >> $@
endif
#
+ifeq "$(CC_CLANG_BACKEND)" "1"
+ @echo >> $@
+ @echo "#define clang_CC_FLAVOR 1" >> $@
+endif
+#
@echo "#endif /* __GHCAUTOCONF_H__ */" >> $@
@echo "Done."
@@ -158,19 +163,19 @@ ifneq "$(BINDIST)" "YES"
$(includes_DERIVEDCONSTANTS): $$(includes_H_CONFIG) $$(includes_H_PLATFORM) $$(includes_H_FILES) $$(rts_H_FILES)
$(includes_GHCCONSTANTS_HASKELL_VALUE): $$(includes_H_CONFIG) $$(includes_H_PLATFORM) $$(includes_H_FILES) $$(rts_H_FILES)
-$(includes_DERIVEDCONSTANTS): $(INPLACE_BIN)/deriveConstants$(exeext) | $$(dir $$@)/.
+$(includes_DERIVEDCONSTANTS): $(deriveConstants_INPLACE) | $$(dir $$@)/.
$< --gen-header -o $@ --tmpdir $(dir $@) $(DERIVE_CONSTANTS_FLAGS)
-$(includes_GHCCONSTANTS_HASKELL_TYPE): $(INPLACE_BIN)/deriveConstants$(exeext) | $$(dir $$@)/.
+$(includes_GHCCONSTANTS_HASKELL_TYPE): $(deriveConstants_INPLACE) | $$(dir $$@)/.
$< --gen-haskell-type -o $@ --tmpdir $(dir $@) $(DERIVE_CONSTANTS_FLAGS)
-$(includes_GHCCONSTANTS_HASKELL_VALUE): $(INPLACE_BIN)/deriveConstants$(exeext) | $$(dir $$@)/.
+$(includes_GHCCONSTANTS_HASKELL_VALUE): $(deriveConstants_INPLACE) | $$(dir $$@)/.
$< --gen-haskell-value -o $@ --tmpdir $(dir $@) $(DERIVE_CONSTANTS_FLAGS)
-$(includes_GHCCONSTANTS_HASKELL_WRAPPERS): $(INPLACE_BIN)/deriveConstants$(exeext) | $$(dir $$@)/.
+$(includes_GHCCONSTANTS_HASKELL_WRAPPERS): $(deriveConstants_INPLACE) | $$(dir $$@)/.
$< --gen-haskell-wrappers -o $@ --tmpdir $(dir $@) $(DERIVE_CONSTANTS_FLAGS)
-$(includes_GHCCONSTANTS_HASKELL_EXPORTS): $(INPLACE_BIN)/deriveConstants$(exeext) | $$(dir $$@)/.
+$(includes_GHCCONSTANTS_HASKELL_EXPORTS): $(deriveConstants_INPLACE) | $$(dir $$@)/.
$< --gen-haskell-exports -o $@ --tmpdir $(dir $@) $(DERIVE_CONSTANTS_FLAGS)
endif
@@ -180,7 +185,7 @@ endif
$(eval $(call clean-target,includes,,\
$(includes_H_CONFIG) $(includes_H_PLATFORM)))
-$(eval $(call all-target,includes,,\
+$(eval $(call all-target,includes,\
$(includes_H_CONFIG) $(includes_H_PLATFORM) \
$(includes_GHCCONSTANTS_HASKELL_TYPE) \
$(includes_GHCCONSTANTS_HASKELL_VALUE) \
diff --git a/includes/rts/Constants.h b/includes/rts/Constants.h
index 5ff4d4e51e..494abe2b22 100644
--- a/includes/rts/Constants.h
+++ b/includes/rts/Constants.h
@@ -84,7 +84,7 @@
#define MAX_FLOAT_REG 6
#define MAX_DOUBLE_REG 6
#define MAX_LONG_REG 1
-#define MAX_SSE_REG 6
+#define MAX_XMM_REG 6
/* -----------------------------------------------------------------------------
Semi-Tagging constants
@@ -202,31 +202,32 @@
*/
#define NotBlocked 0
#define BlockedOnMVar 1
-#define BlockedOnBlackHole 2
-#define BlockedOnRead 3
-#define BlockedOnWrite 4
-#define BlockedOnDelay 5
-#define BlockedOnSTM 6
+#define BlockedOnMVarRead 2
+#define BlockedOnBlackHole 3
+#define BlockedOnRead 4
+#define BlockedOnWrite 5
+#define BlockedOnDelay 6
+#define BlockedOnSTM 7
/* Win32 only: */
-#define BlockedOnDoProc 7
+#define BlockedOnDoProc 8
/* Only relevant for PAR: */
/* blocked on a remote closure represented by a Global Address: */
-#define BlockedOnGA 8
+#define BlockedOnGA 9
/* same as above but without sending a Fetch message */
-#define BlockedOnGA_NoSend 9
+#define BlockedOnGA_NoSend 10
/* Only relevant for THREADED_RTS: */
-#define BlockedOnCCall 10
-#define BlockedOnCCall_Interruptible 11
+#define BlockedOnCCall 11
+#define BlockedOnCCall_Interruptible 12
/* same as above but permit killing the worker thread */
/* Involved in a message sent to tso->msg_cap */
-#define BlockedOnMsgThrowTo 12
+#define BlockedOnMsgThrowTo 13
/* The thread is not on any run queues, but can be woken up
by tryWakeupThread() */
-#define ThreadMigrating 13
+#define ThreadMigrating 14
/*
* These constants are returned to the scheduler by a thread that has
diff --git a/includes/rts/Globals.h b/includes/rts/Globals.h
index 720d9674cc..d0d34ef981 100644
--- a/includes/rts/Globals.h
+++ b/includes/rts/Globals.h
@@ -25,5 +25,6 @@ StgStablePtr getOrSetSystemEventThreadEventManagerStore(StgStablePtr ptr);
StgStablePtr getOrSetSystemEventThreadIOManagerThreadStore(StgStablePtr ptr);
StgStablePtr getOrSetSystemTimerThreadEventManagerStore(StgStablePtr ptr);
StgStablePtr getOrSetSystemTimerThreadIOManagerThreadStore(StgStablePtr ptr);
+StgStablePtr getOrSetLibHSghcFastStringTable(StgStablePtr ptr);
#endif /* RTS_GLOBALS_H */
diff --git a/includes/rts/PrimFloat.h b/includes/rts/PrimFloat.h
index 7d137a7b6c..96a7d25df3 100644
--- a/includes/rts/PrimFloat.h
+++ b/includes/rts/PrimFloat.h
@@ -14,5 +14,7 @@
StgDouble __int_encodeDouble (I_ j, I_ e);
StgFloat __int_encodeFloat (I_ j, I_ e);
+StgDouble __word_encodeDouble (W_ j, I_ e);
+StgFloat __word_encodeFloat (W_ j, I_ e);
#endif /* RTS_PRIMFLOAT_H */
diff --git a/includes/rts/Utils.h b/includes/rts/Utils.h
index 1cb52ae83f..119ec5b6a0 100644
--- a/includes/rts/Utils.h
+++ b/includes/rts/Utils.h
@@ -13,11 +13,6 @@
#ifndef RTS_UTILS_H
#define RTS_UTILS_H
-// Used in GHC (basicTypes/Unique.lhs, and Data.Unique in the base
-// package.
-HsInt genSymZh(void);
-HsInt resetGenSymZh(void);
-
/* Alternate to raise(3) for threaded rts, for BSD-based OSes */
int genericRaise(int sig);
diff --git a/includes/rts/storage/Closures.h b/includes/rts/storage/Closures.h
index 2302b7d2a1..09e702149a 100644
--- a/includes/rts/storage/Closures.h
+++ b/includes/rts/storage/Closures.h
@@ -80,7 +80,7 @@ typedef struct {
typedef struct StgClosure_ {
StgHeader header;
struct StgClosure_ *payload[FLEXIBLE_ARRAY];
-} *StgClosurePtr; // StgClosure defined in Rts.h
+} *StgClosurePtr; // StgClosure defined in rts/Types.h
typedef struct {
StgThunkHeader header;
@@ -191,17 +191,21 @@ typedef struct _StgStableName {
typedef struct _StgWeak { /* Weak v */
StgHeader header;
- StgClosure *cfinalizer;
+ StgClosure *cfinalizers;
StgClosure *key;
StgClosure *value; /* v */
StgClosure *finalizer;
struct _StgWeak *link;
} StgWeak;
-typedef struct _StgDeadWeak { /* Weak v */
+typedef struct _StgCFinalizerList {
StgHeader header;
- struct _StgWeak *link;
-} StgDeadWeak;
+ StgClosure *link;
+ void (*fptr)(void);
+ void *ptr;
+ void *eptr;
+ StgWord flag; /* has environment (0 or 1) */
+} StgCFinalizerList;
/* Byte code objects. These are fixed size objects with pointers to
* four arrays, designed so that a BCO can be easily "re-linked" to
diff --git a/includes/rts/storage/GC.h b/includes/rts/storage/GC.h
index 80f11d3ee1..fb5e21e832 100644
--- a/includes/rts/storage/GC.h
+++ b/includes/rts/storage/GC.h
@@ -83,6 +83,8 @@ typedef struct generation_ {
StgTSO * threads; // threads in this gen
// linked via global_link
+ StgWeak * weak_ptr_list; // weak pointers in this gen
+
struct generation_ *to; // destination gen for live objects
// stats information
@@ -116,6 +118,7 @@ typedef struct generation_ {
bdescr * bitmap; // bitmap for compacting collection
StgTSO * old_threads;
+ StgWeak * old_weak_ptr_list;
} generation;
extern generation * generations;
@@ -154,8 +157,11 @@ StgPtr allocate ( Capability *cap, W_ n );
StgPtr allocatePinned ( Capability *cap, W_ n );
/* memory allocator for executable memory */
-void * allocateExec(W_ len, void **exec_addr);
-void freeExec (void *p);
+typedef void* AdjustorWritable;
+typedef void* AdjustorExecutable;
+
+AdjustorWritable allocateExec(W_ len, AdjustorExecutable *exec_addr);
+void freeExec (AdjustorExecutable p);
// Used by GC checks in external .cmm code:
extern W_ large_alloc_lim;
diff --git a/includes/rts/storage/SMPClosureOps.h b/includes/rts/storage/SMPClosureOps.h
index 39349874f7..a8ebb5d0ed 100644
--- a/includes/rts/storage/SMPClosureOps.h
+++ b/includes/rts/storage/SMPClosureOps.h
@@ -11,13 +11,27 @@
#ifdef CMINUSMINUS
+/* Lock closure, equivalent to ccall lockClosure but the condition is inlined.
+ * Arguments are swapped for uniformity with unlockClosure. */
+#if defined(THREADED_RTS)
+#define LOCK_CLOSURE(closure, info) \
+ if (CInt[n_capabilities] == 1 :: CInt) { \
+ info = GET_INFO(closure); \
+ } else { \
+ ("ptr" info) = ccall reallyLockClosure(closure "ptr"); \
+ }
+#else
+#define LOCK_CLOSURE(closure, info) info = GET_INFO(closure)
+#endif
+
#define unlockClosure(ptr,info) \
prim_write_barrier; \
- StgHeader_info(ptr) = info;
+ StgHeader_info(ptr) = info;
#else
-EXTERN_INLINE StgInfoTable *lockClosure(StgClosure *p);
+INLINE_HEADER StgInfoTable *lockClosure(StgClosure *p);
+EXTERN_INLINE StgInfoTable *reallyLockClosure(StgClosure *p);
EXTERN_INLINE StgInfoTable *tryLockClosure(StgClosure *p);
EXTERN_INLINE void unlockClosure(StgClosure *p, const StgInfoTable *info);
@@ -29,35 +43,58 @@ EXTERN_INLINE void unlockClosure(StgClosure *p, const StgInfoTable *info);
* This is used primarily in the implementation of MVars.
* -------------------------------------------------------------------------- */
-// We want a callable copy of lockClosure() so that we can refer to it
-// from .cmm files compiled using the native codegen.
-EXTERN_INLINE StgInfoTable *lockClosure(StgClosure *p)
+// We want a callable copy of reallyLockClosure() so that we can refer to it
+// from .cmm files compiled using the native codegen, so these are given
+// EXTERN_INLINE. C-- should use LOCK_CLOSURE not lockClosure, so we've
+// kept it INLINE_HEADER.
+EXTERN_INLINE StgInfoTable *reallyLockClosure(StgClosure *p)
{
StgWord info;
do {
- nat i = 0;
- do {
- info = xchg((P_)(void *)&p->header.info, (W_)&stg_WHITEHOLE_info);
- if (info != (W_)&stg_WHITEHOLE_info) return (StgInfoTable *)info;
- } while (++i < SPIN_COUNT);
- yieldThread();
+ nat i = 0;
+ do {
+ info = xchg((P_)(void *)&p->header.info, (W_)&stg_WHITEHOLE_info);
+ if (info != (W_)&stg_WHITEHOLE_info) return (StgInfoTable *)info;
+ } while (++i < SPIN_COUNT);
+ yieldThread();
} while (1);
}
+INLINE_HEADER StgInfoTable *lockClosure(StgClosure *p)
+{
+ if (n_capabilities == 1) {
+ return (StgInfoTable *)p->header.info;
+ }
+ else {
+ return reallyLockClosure(p);
+ }
+}
+
+// ToDo: consider splitting tryLockClosure into reallyTryLockClosure,
+// same as lockClosure
EXTERN_INLINE StgInfoTable *tryLockClosure(StgClosure *p)
{
StgWord info;
- info = xchg((P_)(void *)&p->header.info, (W_)&stg_WHITEHOLE_info);
- if (info != (W_)&stg_WHITEHOLE_info) {
- return (StgInfoTable *)info;
- } else {
- return NULL;
+ if (n_capabilities == 1) {
+ return (StgInfoTable *)p->header.info;
+ }
+ else {
+ info = xchg((P_)(void *)&p->header.info, (W_)&stg_WHITEHOLE_info);
+ if (info != (W_)&stg_WHITEHOLE_info) {
+ return (StgInfoTable *)info;
+ } else {
+ return NULL;
+ }
}
}
#else /* !THREADED_RTS */
EXTERN_INLINE StgInfoTable *
+reallyLockClosure(StgClosure *p)
+{ return (StgInfoTable *)p->header.info; }
+
+INLINE_HEADER StgInfoTable *
lockClosure(StgClosure *p)
{ return (StgInfoTable *)p->header.info; }
@@ -75,12 +112,12 @@ EXTERN_INLINE void unlockClosure(StgClosure *p, const StgInfoTable *info)
}
// Handy specialised versions of lockClosure()/unlockClosure()
-EXTERN_INLINE void lockTSO(StgTSO *tso);
-EXTERN_INLINE void lockTSO(StgTSO *tso)
+INLINE_HEADER void lockTSO(StgTSO *tso);
+INLINE_HEADER void lockTSO(StgTSO *tso)
{ lockClosure((StgClosure *)tso); }
-EXTERN_INLINE void unlockTSO(StgTSO *tso);
-EXTERN_INLINE void unlockTSO(StgTSO *tso)
+INLINE_HEADER void unlockTSO(StgTSO *tso);
+INLINE_HEADER void unlockTSO(StgTSO *tso)
{ unlockClosure((StgClosure*)tso, (const StgInfoTable *)&stg_TSO_info); }
#endif /* CMINUSMINUS */
diff --git a/includes/stg/MachRegs.h b/includes/stg/MachRegs.h
index 76bdb1fc21..a8f2215578 100644
--- a/includes/stg/MachRegs.h
+++ b/includes/stg/MachRegs.h
@@ -107,7 +107,7 @@
#define MAX_REAL_FLOAT_REG 0
#define MAX_REAL_DOUBLE_REG 0
#define MAX_REAL_LONG_REG 0
-#define MAX_REAL_SSE_REG 0
+#define MAX_REAL_XMM_REG 0
/* -----------------------------------------------------------------------------
The x86-64 register mapping
@@ -212,7 +212,7 @@
#define MAX_REAL_FLOAT_REG 6
#define MAX_REAL_DOUBLE_REG 6
#define MAX_REAL_LONG_REG 0
-#define MAX_REAL_SSE_REG 6
+#define MAX_REAL_XMM_REG 6
/* -----------------------------------------------------------------------------
The PowerPC register mapping
@@ -565,21 +565,21 @@
# endif
#endif
-#ifndef MAX_REAL_SSE_REG
-# if defined(REG_SSE6)
-# define MAX_REAL_SSE_REG 6
-# elif defined(REG_SSE5)
-# define MAX_REAL_SSE_REG 5
-# elif defined(REG_SSE4)
-# define MAX_REAL_SSE_REG 4
-# elif defined(REG_SSE3)
-# define MAX_REAL_SSE_REG 3
-# elif defined(REG_SSE2)
-# define MAX_REAL_SSE_REG 2
-# elif defined(REG_SSE1)
-# define MAX_REAL_SSE_REG 1
+#ifndef MAX_REAL_XMM_REG
+# if defined(REG_XMM6)
+# define MAX_REAL_XMM_REG 6
+# elif defined(REG_XMM5)
+# define MAX_REAL_XMM_REG 5
+# elif defined(REG_XMM4)
+# define MAX_REAL_XMM_REG 4
+# elif defined(REG_XMM3)
+# define MAX_REAL_XMM_REG 3
+# elif defined(REG_XMM2)
+# define MAX_REAL_XMM_REG 2
+# elif defined(REG_XMM1)
+# define MAX_REAL_XMM_REG 1
# else
-# define MAX_REAL_SSE_REG 0
+# define MAX_REAL_XMM_REG 0
# endif
#endif
diff --git a/includes/stg/MiscClosures.h b/includes/stg/MiscClosures.h
index b9b4f2304f..b0ed03b814 100644
--- a/includes/stg/MiscClosures.h
+++ b/includes/stg/MiscClosures.h
@@ -98,6 +98,7 @@ RTS_FUN(stg_BCO);
RTS_ENTRY(stg_EVACUATED);
RTS_ENTRY(stg_WEAK);
RTS_ENTRY(stg_DEAD_WEAK);
+RTS_ENTRY(stg_C_FINALIZER_LIST);
RTS_ENTRY(stg_STABLE_NAME);
RTS_ENTRY(stg_MVAR_CLEAN);
RTS_ENTRY(stg_MVAR_DIRTY);
@@ -292,7 +293,9 @@ RTS_FUN_DECL(stg_block_noregs);
RTS_FUN_DECL(stg_block_blackhole);
RTS_FUN_DECL(stg_block_blackhole_finally);
RTS_FUN_DECL(stg_block_takemvar);
+RTS_FUN_DECL(stg_block_readmvar);
RTS_RET(stg_block_takemvar);
+RTS_RET(stg_block_readmvar);
RTS_FUN_DECL(stg_block_putmvar);
RTS_RET(stg_block_putmvar);
#ifdef mingw32_HOST_OS
@@ -375,8 +378,10 @@ RTS_FUN_DECL(stg_isEmptyMVarzh);
RTS_FUN_DECL(stg_newMVarzh);
RTS_FUN_DECL(stg_takeMVarzh);
RTS_FUN_DECL(stg_putMVarzh);
+RTS_FUN_DECL(stg_readMVarzh);
RTS_FUN_DECL(stg_tryTakeMVarzh);
RTS_FUN_DECL(stg_tryPutMVarzh);
+RTS_FUN_DECL(stg_tryReadMVarzh);
RTS_FUN_DECL(stg_waitReadzh);
RTS_FUN_DECL(stg_waitWritezh);
@@ -412,7 +417,7 @@ RTS_FUN_DECL(stg_threadStatuszh);
RTS_FUN_DECL(stg_mkWeakzh);
RTS_FUN_DECL(stg_mkWeakNoFinalizzerzh);
RTS_FUN_DECL(stg_mkWeakForeignzh);
-RTS_FUN_DECL(stg_mkWeakForeignEnvzh);
+RTS_FUN_DECL(stg_addCFinalizzerToWeakzh);
RTS_FUN_DECL(stg_finalizzeWeakzh);
RTS_FUN_DECL(stg_deRefWeakzh);
@@ -465,7 +470,6 @@ extern StgWord stg_stack_save_entries[];
// Storage.c
extern unsigned int RTS_VAR(g0);
extern unsigned int RTS_VAR(large_alloc_lim);
-extern StgWord RTS_VAR(weak_ptr_list);
extern StgWord RTS_VAR(atomic_modify_mutvar_mutex);
// RtsFlags
@@ -484,6 +488,9 @@ extern StgWord CCS_SYSTEM[];
extern unsigned int RTS_VAR(CC_ID); /* global ids */
extern unsigned int RTS_VAR(CCS_ID);
+// Capability.c
+extern unsigned int n_capabilities;
+
#endif
#endif /* STGMISCCLOSURES_H */
diff --git a/includes/stg/SMP.h b/includes/stg/SMP.h
index bfd6bbcfab..99c25fe355 100644
--- a/includes/stg/SMP.h
+++ b/includes/stg/SMP.h
@@ -365,9 +365,12 @@ load_load_barrier(void) {
/* ---------------------------------------------------------------------- */
#else /* !THREADED_RTS */
-#define write_barrier() /* nothing */
-#define store_load_barrier() /* nothing */
-#define load_load_barrier() /* nothing */
+EXTERN_INLINE void write_barrier(void);
+EXTERN_INLINE void store_load_barrier(void);
+EXTERN_INLINE void load_load_barrier(void);
+EXTERN_INLINE void write_barrier () {} /* nothing */
+EXTERN_INLINE void store_load_barrier() {} /* nothing */
+EXTERN_INLINE void load_load_barrier () {} /* nothing */
#if !IN_STG_CODE || IN_STGCRUN
INLINE_HEADER StgWord
diff --git a/includes/stg/Ticky.h b/includes/stg/Ticky.h
index 182c99654f..6f92a7f864 100644
--- a/includes/stg/Ticky.h
+++ b/includes/stg/Ticky.h
@@ -46,8 +46,10 @@ extern W_ top_ct[];
#endif
EXTERN StgInt ENT_VIA_NODE_ctr INIT(0);
-EXTERN StgInt ENT_STATIC_THK_ctr INIT(0);
-EXTERN StgInt ENT_DYN_THK_ctr INIT(0);
+EXTERN StgInt ENT_STATIC_THK_SINGLE_ctr INIT(0);
+EXTERN StgInt ENT_DYN_THK_SINGLE_ctr INIT(0);
+EXTERN StgInt ENT_STATIC_THK_MANY_ctr INIT(0);
+EXTERN StgInt ENT_DYN_THK_MANY_ctr INIT(0);
EXTERN StgInt ENT_STATIC_FUN_DIRECT_ctr INIT(0);
EXTERN StgInt ENT_DYN_FUN_DIRECT_ctr INIT(0);
EXTERN StgInt ENT_STATIC_CON_ctr INIT(0);
@@ -128,7 +130,6 @@ EXTERN StgInt UPD_OLD_IND_ctr INIT(0);
EXTERN StgInt UPD_OLD_PERM_IND_ctr INIT(0);
EXTERN StgInt UPD_BH_UPDATABLE_ctr INIT(0);
-EXTERN StgInt UPD_BH_SINGLE_ENTRY_ctr INIT(0);
EXTERN StgInt UPD_CAF_BH_UPDATABLE_ctr INIT(0);
EXTERN StgInt UPD_CAF_BH_SINGLE_ENTRY_ctr INIT(0);