summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÖmer Sinan Ağacan <omeragacan@gmail.com>2019-02-16 15:48:21 +0300
committerBen Gamari <ben@smart-cactus.org>2019-02-22 11:26:41 -0500
commitbb47beb476282c49922a8d1273ccb688b69461a3 (patch)
treef35c2dcd9ac26d8271e7a0cd99b84d1d1058846c
parent505feaab820ae1249a126cc455b45fdf01579a75 (diff)
downloadhaskell-bb47beb476282c49922a8d1273ccb688b69461a3.tar.gz
Remove upd_rem_set_syncd
-rw-r--r--rts/Capability.h1
-rw-r--r--rts/sm/NonMoving.c4
-rw-r--r--rts/sm/NonMovingMark.c24
3 files changed, 9 insertions, 20 deletions
diff --git a/rts/Capability.h b/rts/Capability.h
index 70d1e02bcf..3db7d57696 100644
--- a/rts/Capability.h
+++ b/rts/Capability.h
@@ -87,7 +87,6 @@ struct Capability_ {
// The update remembered set for the non-moving collector
UpdRemSet upd_rem_set;
- bool upd_rem_set_syncd;
// block for allocating pinned objects into
bdescr *pinned_object_block;
diff --git a/rts/sm/NonMoving.c b/rts/sm/NonMoving.c
index 75aa7c21d7..461d258597 100644
--- a/rts/sm/NonMoving.c
+++ b/rts/sm/NonMoving.c
@@ -437,10 +437,6 @@ void nonmovingCollect(StgWeak **dead_weaks, StgTSO **resurrected_threads)
if (concurrent_coll_running || sched_state > SCHED_RUNNING) {
return;
}
-
- for (unsigned int i = 0; i < n_capabilities; i++) {
- capabilities[i]->upd_rem_set_syncd = false;
- }
#endif
nonmovingPrepareMark();
diff --git a/rts/sm/NonMovingMark.c b/rts/sm/NonMovingMark.c
index a5af7dcc0a..8990ff7412 100644
--- a/rts/sm/NonMovingMark.c
+++ b/rts/sm/NonMovingMark.c
@@ -222,18 +222,15 @@ static void nonmovingAddUpdRemSetBlocks(MarkQueue *rset)
*/
void nonmovingFlushCapUpdRemSetBlocks(Capability *cap)
{
- if (! cap->upd_rem_set_syncd) {
- debugTrace(DEBUG_nonmoving_gc,
- "Capability %d flushing update remembered set: %d",
- cap->no, markQueueLength(&cap->upd_rem_set.queue));
- traceConcUpdRemSetFlush(cap);
- nonmovingAddUpdRemSetBlocks(&cap->upd_rem_set.queue);
- atomic_inc(&upd_rem_set_flush_count, 1);
- cap->upd_rem_set_syncd = true;
- signalCondition(&upd_rem_set_flushed_cond);
- // After this mutation will remain suspended until nonmovingFinishFlush
- // releases its capabilities.
- }
+ debugTrace(DEBUG_nonmoving_gc,
+ "Capability %d flushing update remembered set: %d",
+ cap->no, markQueueLength(&cap->upd_rem_set.queue));
+ traceConcUpdRemSetFlush(cap);
+ nonmovingAddUpdRemSetBlocks(&cap->upd_rem_set.queue);
+ atomic_inc(&upd_rem_set_flush_count, 1);
+ signalCondition(&upd_rem_set_flushed_cond);
+ // After this mutation will remain suspended until nonmovingFinishFlush
+ // releases its capabilities.
}
/* Request that all capabilities flush their update remembered sets and suspend
@@ -243,9 +240,6 @@ void nonmovingBeginFlush(Task *task)
{
debugTrace(DEBUG_nonmoving_gc, "Starting update remembered set flush...");
traceConcSyncBegin();
- for (unsigned int i = 0; i < n_capabilities; i++) {
- capabilities[i]->upd_rem_set_syncd = false;
- }
upd_rem_set_flush_count = 0;
stopAllCapabilitiesWith(NULL, task, SYNC_FLUSH_UPD_REM_SET);