diff options
author | Simon Marlow <simonmar@microsoft.com> | 2007-10-11 13:55:05 +0000 |
---|---|---|
committer | Simon Marlow <simonmar@microsoft.com> | 2007-10-11 13:55:05 +0000 |
commit | 1ed01a871030f05905a9595e4837dfffc087ef64 (patch) | |
tree | 32c1335b52d0ec28d6a99d4ccaeae6a36a73bddc /rts/sm/GC.h | |
parent | 53d57aa3aa498120eb1beba1b9c30e6a5e4e2d0a (diff) | |
download | haskell-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/sm/GC.h')
-rw-r--r-- | rts/sm/GC.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/rts/sm/GC.h b/rts/sm/GC.h index b95466edb9..d3ce8cf92d 100644 --- a/rts/sm/GC.h +++ b/rts/sm/GC.h @@ -36,7 +36,7 @@ extern lnat new_blocks; // blocks allocated during this GC extern lnat new_scavd_blocks; // ditto, but depth-first blocks #ifdef DEBUG -extern nat mutlist_MUTVARS, mutlist_MUTARRS, mutlist_OTHERS; +extern nat mutlist_MUTVARS, mutlist_MUTARRS, mutlist_MVARS, mutlist_OTHERS; #endif StgClosure * isAlive(StgClosure *p); |