From 1ed01a871030f05905a9595e4837dfffc087ef64 Mon Sep 17 00:00:00 2001 From: Simon Marlow Date: Thu, 11 Oct 2007 13:55:05 +0000 Subject: 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. --- rts/sm/Evac.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'rts/sm/Evac.c') diff --git a/rts/sm/Evac.c b/rts/sm/Evac.c index a0c2ae7a84..42b6b1f666 100644 --- a/rts/sm/Evac.c +++ b/rts/sm/Evac.c @@ -448,7 +448,8 @@ loop: case MUT_VAR_CLEAN: case MUT_VAR_DIRTY: - case MVAR: + case MVAR_CLEAN: + case MVAR_DIRTY: return copy(q,sizeW_fromITBL(info),stp); case CONSTR_0_1: -- cgit v1.2.1