diff --git a/src/hotspot/share/gc/g1/g1ConcurrentMark.cpp b/src/hotspot/share/gc/g1/g1ConcurrentMark.cpp index 49b2945bcf6..a8a8f1448de 100644 --- a/src/hotspot/share/gc/g1/g1ConcurrentMark.cpp +++ b/src/hotspot/share/gc/g1/g1ConcurrentMark.cpp @@ -1898,6 +1898,7 @@ G1ConcurrentMark::claim_region(uint worker_id) { assert(_finger >= end, "the finger should have moved forward"); if (limit > bottom) { + assert(!curr_region->is_closed_archive(), "CA regions should be skipped"); return curr_region; } else { assert(limit == bottom, diff --git a/src/hotspot/share/gc/g1/heapRegion.inline.hpp b/src/hotspot/share/gc/g1/heapRegion.inline.hpp index e94320fbdb4..39db33feda8 100644 --- a/src/hotspot/share/gc/g1/heapRegion.inline.hpp +++ b/src/hotspot/share/gc/g1/heapRegion.inline.hpp @@ -242,7 +242,10 @@ inline void HeapRegion::update_bot_for_obj(HeapWord* obj_start, size_t obj_size) inline void HeapRegion::note_start_of_marking() { _next_marked_bytes = 0; - _next_top_at_mark_start = top(); + if (!is_closed_archive()) { + _next_top_at_mark_start = top(); + } + assert(!is_closed_archive() || next_top_at_mark_start() == bottom(), "CA region's nTAMS must always be at bottom"); _gc_efficiency = -1.0; }