Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Tobias Decking
GHC
Commits
608bc3f3
Commit
608bc3f3
authored
Feb 09, 2006
by
Simon Marlow
Browse files
change dirty_MUT_VAR() to use recordMutableCap()
rather than recordMutableGen(), the former works better in SMP
parent
7b2ff4cc
Changes
5
Hide whitespace changes
Inline
Side-by-side
ghc/compiler/codeGen/CgPrimOp.hs
View file @
608bc3f3
...
...
@@ -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) \
...
...
ghc/includes/RtsExternal.h
View file @
608bc3f3
...
...
@@ -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 */
ghc/includes/Storage.h
View file @
608bc3f3
...
...
@@ -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
...
...
ghc/rts/PrimOps.cmm
View file @
608bc3f3
...
...
@@ -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);
...
...
ghc/rts/Storage.c
View file @
608bc3f3
...
...
@@ -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
);
recordMutable
Cap
(
p
,
cap
,
Bdescr
(
p
)
->
gen_no
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment