diff options
author | Simon Marlow <marlowsd@gmail.com> | 2012-11-16 09:22:00 +0000 |
---|---|---|
committer | Simon Marlow <marlowsd@gmail.com> | 2012-11-16 11:26:20 +0000 |
commit | 6d784c43592290ec16db8b7f0f2a012dff3ed497 (patch) | |
tree | a317ef1fc1ee40883e92cde308c292f7125db2b7 /rts/ClosureFlags.c | |
parent | 97dc57c6e2bdbddd0a0170a283149a570a07179c (diff) | |
download | haskell-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/ClosureFlags.c')
-rw-r--r-- | rts/ClosureFlags.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/rts/ClosureFlags.c b/rts/ClosureFlags.c index a2a140282f..886288d733 100644 --- a/rts/ClosureFlags.c +++ b/rts/ClosureFlags.c @@ -64,7 +64,8 @@ StgWord16 closure_flags[] = { [BLOCKING_QUEUE] = ( _NS| _MUT|_UPT ), [MVAR_CLEAN] = (_HNF| _NS| _MUT|_UPT ), [MVAR_DIRTY] = (_HNF| _NS| _MUT|_UPT ), - [ARR_WORDS] = (_HNF| _NS| _UPT ), + [TVAR] = (_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 ), [MUT_ARR_PTRS_FROZEN0] = (_HNF| _NS| _MUT|_UPT ), @@ -83,6 +84,6 @@ StgWord16 closure_flags[] = { [WHITEHOLE] = ( 0 ) }; -#if N_CLOSURE_TYPES != 60 +#if N_CLOSURE_TYPES != 61 #error Closure types changed: update ClosureFlags.c! #endif |