Add a write barrier for TVAR closures
authorSimon Marlow <marlowsd@gmail.com>
Fri, 16 Nov 2012 09:22:00 +0000 (09:22 +0000)
committerSimon Marlow <marlowsd@gmail.com>
Fri, 16 Nov 2012 11:26:20 +0000 (11:26 +0000)
commit6d784c43592290ec16db8b7f0f2a012dff3ed497
treea317ef1fc1ee40883e92cde308c292f7125db2b7
parent97dc57c6e2bdbddd0a0170a283149a570a07179c
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.
22 files changed:
includes/rts/storage/ClosureTypes.h
includes/stg/MiscClosures.h
rts/ClosureFlags.c
rts/Exception.cmm
rts/LdvProfile.c
rts/Linker.c
rts/PrimOps.cmm
rts/Printer.c
rts/ProfHeap.c
rts/RetainerProfile.c
rts/STM.c
rts/STM.h
rts/Schedule.c
rts/StgMiscClosures.cmm
rts/sm/Compact.c
rts/sm/Evac.c
rts/sm/GC.c
rts/sm/GC.h
rts/sm/Sanity.c
rts/sm/Scav.c
rts/sm/Storage.c
rts/sm/Storage.h