Skip to content
Permalink
Browse files
8254695: G1: Next mark bitmap clear not cancelled after marking abort
Reviewed-by: iwalulya, sjohanss
  • Loading branch information
Thomas Schatzl committed Oct 16, 2020
1 parent 34583eb commit 1742c44ac97b644d90c7f2115edbb5ca507ca731
Showing with 8 additions and 4 deletions.
  1. +8 −4 src/hotspot/share/gc/g1/g1ConcurrentMark.cpp
@@ -594,15 +594,19 @@ class G1ClearBitMapTask : public AbstractGangTask {
HeapWord* const end = r->end();

while (cur < end) {
// Abort iteration if necessary.
if (_cm != NULL) {
_cm->do_yield_check();
if (_cm->has_aborted()) {
return true;
}
}

MemRegion mr(cur, MIN2(cur + chunk_size_in_words, end));
_bitmap->clear_range(mr);

cur += chunk_size_in_words;

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

1 comment on commit 1742c44

@bridgekeeper

This comment has been minimized.

Copy link

@bridgekeeper bridgekeeper bot commented on 1742c44 Oct 16, 2020

Please sign in to comment.