summaryrefslogtreecommitdiff
path: root/rts/ClosureFlags.c
diff options
context:
space:
mode:
authorSimon Marlow <simonmar@microsoft.com>2007-10-11 13:55:05 +0000
committerSimon Marlow <simonmar@microsoft.com>2007-10-11 13:55:05 +0000
commit1ed01a871030f05905a9595e4837dfffc087ef64 (patch)
tree32c1335b52d0ec28d6a99d4ccaeae6a36a73bddc /rts/ClosureFlags.c
parent53d57aa3aa498120eb1beba1b9c30e6a5e4e2d0a (diff)
downloadhaskell-1ed01a871030f05905a9595e4837dfffc087ef64.tar.gz
Add a proper write barrier for MVars
Previously MVars were always on the mutable list of the old generation, which meant every MVar was visited during every minor GC. With lots of MVars hanging around, this gets expensive. We addressed this problem for MUT_VARs (aka IORefs) a while ago, the solution is to use a traditional GC write-barrier when the object is modified. This patch does the same thing for MVars. TVars are still done the old way, they could probably benefit from the same treatment too.
Diffstat (limited to 'rts/ClosureFlags.c')
-rw-r--r--rts/ClosureFlags.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/rts/ClosureFlags.c b/rts/ClosureFlags.c
index 08b4dd3e27..12e6632f24 100644
--- a/rts/ClosureFlags.c
+++ b/rts/ClosureFlags.c
@@ -71,7 +71,8 @@ StgWord16 closure_flags[] = {
/* BLACKHOLE = */ ( _NS| _UPT ),
/* SE_BLACKHOLE = */ ( _NS| _UPT ),
/* SE_CAF_BLACKHOLE = */ ( _NS| _UPT ),
-/* MVAR = */ (_HNF| _NS| _MUT|_UPT ),
+/* MVAR_CLEAN = */ (_HNF| _NS| _MUT|_UPT ),
+/* MVAR_DIRTY = */ (_HNF| _NS| _MUT|_UPT ),
/* ARR_WORDS = */ (_HNF| _NS| _UPT ),
/* MUT_ARR_PTRS_CLEAN = */ (_HNF| _NS| _MUT|_UPT ),
/* MUT_ARR_PTRS_DIRTY = */ (_HNF| _NS| _MUT|_UPT ),
@@ -99,6 +100,6 @@ StgWord16 closure_flags[] = {
/* CATCH_STM_FRAME = */ ( _BTM )
};
-#if N_CLOSURE_TYPES != 71
+#if N_CLOSURE_TYPES != 72
#error Closure types changed: update ClosureFlags.c!
#endif