summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2020-02-17 16:56:24 -0500
committerBen Gamari <ben@smart-cactus.org>2020-02-20 21:22:31 -0500
commit2e922d4ee712a2d8a68511dcb4ce4c79cc8123f9 (patch)
treecc18455afe4b3073e98e1c5c227ec2f56c461f1a
parent6880d6aa1e6e96579bbff89712efd813489cc828 (diff)
downloadhaskell-wip/gc/prefetch-mark.tar.gz
nonmoving: Prefetch bitmap mark bytewip/gc/prefetch-mark
We will need to load the mark byte when we go to mark the closure.
-rw-r--r--rts/sm/NonMovingMark.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/rts/sm/NonMovingMark.c b/rts/sm/NonMovingMark.c
index 81000566cb..20de865343 100644
--- a/rts/sm/NonMovingMark.c
+++ b/rts/sm/NonMovingMark.c
@@ -847,6 +847,11 @@ static MarkQueueEnt markQueuePop (MarkQueue *q)
// marked first.
prefetchForRead(&new.mark_closure.p->header.info);
prefetchForRead(Bdescr((StgPtr) new.mark_closure.p));
+ {
+ struct NonmovingSegment *seg = nonmovingGetSegment((StgPtr) new.mark_closure.p);
+ nonmoving_block_idx blk_idx = nonmovingGetBlockIdx((StgPtr) new.mark_closure.p);
+ prefetchForRead(&seg->bitmap[blk_idx]);
+ }
q->prefetch_queue[i] = new;
i = (i + 1) % MARK_PREFETCH_QUEUE_DEPTH;
}