summaryrefslogtreecommitdiff
path: root/rts/StgMiscClosures.cmm
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2012-11-16 09:22:00 +0000
committerSimon Marlow <marlowsd@gmail.com>2012-11-16 11:26:20 +0000
commit6d784c43592290ec16db8b7f0f2a012dff3ed497 (patch)
treea317ef1fc1ee40883e92cde308c292f7125db2b7 /rts/StgMiscClosures.cmm
parent97dc57c6e2bdbddd0a0170a283149a570a07179c (diff)
downloadhaskell-6d784c43592290ec16db8b7f0f2a012dff3ed497.tar.gz
Add a write barrier for TVAR closures
This improves GC performance when there are a lot of TVars in the heap. For instance, a TChan with a lot of elements causes a massive GC drag without this patch. There's more to do - several other STM closure types don't have write barriers, so GC performance when there are a lot of threads blocked on STM isn't great. But fixing the problem for TVar is a good start.
Diffstat (limited to 'rts/StgMiscClosures.cmm')
-rw-r--r--rts/StgMiscClosures.cmm7
1 files changed, 5 insertions, 2 deletions
diff --git a/rts/StgMiscClosures.cmm b/rts/StgMiscClosures.cmm
index e6a30e67a3..4341013d5d 100644
--- a/rts/StgMiscClosures.cmm
+++ b/rts/StgMiscClosures.cmm
@@ -474,8 +474,11 @@ INFO_TABLE(stg_MVAR_DIRTY,3,0,MVAR_DIRTY,"MVAR","MVAR")
STM
-------------------------------------------------------------------------- */
-INFO_TABLE(stg_TVAR, 2, 1, MUT_PRIM, "TVAR", "TVAR")
-{ foreign "C" barf("TVAR object entered!") never returns; }
+INFO_TABLE(stg_TVAR_CLEAN, 2, 1, TVAR, "TVAR", "TVAR")
+{ foreign "C" barf("TVAR_CLEAN object entered!") never returns; }
+
+INFO_TABLE(stg_TVAR_DIRTY, 2, 1, TVAR, "TVAR", "TVAR")
+{ foreign "C" barf("TVAR_DIRTY object entered!") never returns; }
INFO_TABLE(stg_TVAR_WATCH_QUEUE, 3, 0, MUT_PRIM, "TVAR_WATCH_QUEUE", "TVAR_WATCH_QUEUE")
{ foreign "C" barf("TVAR_WATCH_QUEUE object entered!") never returns; }