Skip to content

Commit 1742c44

Browse files
author
Thomas Schatzl
committedOct 16, 2020
8254695: G1: Next mark bitmap clear not cancelled after marking abort
Reviewed-by: iwalulya, sjohanss
1 parent 34583eb commit 1742c44

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed
 

‎src/hotspot/share/gc/g1/g1ConcurrentMark.cpp

+8-4
Original file line numberDiff line numberDiff line change
@@ -594,15 +594,19 @@ class G1ClearBitMapTask : public AbstractGangTask {
594594
HeapWord* const end = r->end();
595595

596596
while (cur < end) {
597+
// Abort iteration if necessary.
598+
if (_cm != NULL) {
599+
_cm->do_yield_check();
600+
if (_cm->has_aborted()) {
601+
return true;
602+
}
603+
}
604+
597605
MemRegion mr(cur, MIN2(cur + chunk_size_in_words, end));
598606
_bitmap->clear_range(mr);
599607

600608
cur += chunk_size_in_words;
601609

602-
// Abort iteration if after yielding the marking has been aborted.
603-
if (_cm != NULL && _cm->do_yield_check() && _cm->has_aborted()) {
604-
return true;
605-
}
606610
// Repeat the asserts from before the start of the closure. We will do them
607611
// as asserts here to minimize their overhead on the product. However, we
608612
// will have them as guarantees at the beginning / end of the bitmap

0 commit comments

Comments
 (0)
Please sign in to comment.