Skip to content

Commit

Permalink
8254695: G1: Next mark bitmap clear not cancelled after marking abort
Browse files Browse the repository at this point in the history
Reviewed-by: iwalulya, sjohanss
  • Loading branch information
Thomas Schatzl committed Oct 16, 2020
1 parent 34583eb commit 1742c44
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/hotspot/share/gc/g1/g1ConcurrentMark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

1 comment on commit 1742c44

@bridgekeeper
Copy link

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.