Commit 608bc3f3 authored by Simon Marlow's avatar Simon Marlow
Browse files

change dirty_MUT_VAR() to use recordMutableCap()

rather than recordMutableGen(), the former works better in SMP
parent 7b2ff4cc
......@@ -134,7 +134,8 @@ emitPrimOp [] WriteMutVarOp [mutv,var] live
stmtC (CmmCall (CmmForeignCall (CmmLit (CmmLabel mkDirty_MUT_VAR_Label))
CCallConv)
[{-no results-}]
[(mutv,PtrHint)]
[(CmmReg (CmmGlobal BaseReg), PtrHint),
(mutv,PtrHint)]
(Just vols))
-- #define sizzeofByteArrayzh(r,a) \
......
......@@ -91,6 +91,6 @@ extern void performMajorGC(void);
extern void performGCWithRoots(void (*get_roots)(evac_fn));
extern HsInt64 getAllocations( void );
extern void revertCAFs( void );
extern void dirty_MUT_VAR(StgClosure *);
extern void dirty_MUT_VAR(StgRegTable *reg, StgClosure *p);
#endif /* RTSEXTERNAL_H */
......@@ -269,7 +269,7 @@ extern rtsBool keepCAFs;
and is put on the mutable list.
-------------------------------------------------------------------------- */
void dirty_MUT_VAR(StgClosure *p);
void dirty_MUT_VAR(StgRegTable *reg, StgClosure *p);
/* -----------------------------------------------------------------------------
DEBUGGING predicates for pointers
......
......@@ -228,7 +228,7 @@ atomicModifyMutVarzh_fast
StgThunk_payload(y,0) = z;
StgMutVar_var(R1) = y;
foreign "C" dirty_MUT_VAR(R1 "ptr") [R1];
foreign "C" dirty_MUT_VAR(BaseReg "ptr", R1 "ptr") [R1];
TICK_ALLOC_THUNK_1();
CCCS_ALLOC(THUNK_1_SIZE);
......
......@@ -766,11 +766,12 @@ allocatePinned( nat n )
-------------------------------------------------------------------------- */
void
dirty_MUT_VAR(StgClosure *p)
dirty_MUT_VAR(StgRegTable *reg, StgClosure *p)
{
Capability *cap = regTableToCapability(reg);
if (p->header.info == &stg_MUT_VAR_CLEAN_info) {
p->header.info = &stg_MUT_VAR_DIRTY_info;
recordMutable(p);
recordMutableCap(p,cap,Bdescr(p)->gen_no);
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment