mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 14:24:46 +02:00
6956639: G1: assert(cached_ptr != card_ptr) failed: shouldn't be, concurrentG1Refine.cpp:307
During concurrent refinment, filter cards in young regions after it has been determined that the region has been allocated from and the young type of the region has been set. Reviewed-by: iveresov, tonyp, jcoomes
This commit is contained in:
parent
daf491a814
commit
5c3da1ee7e
5 changed files with 75 additions and 46 deletions
|
@ -658,7 +658,8 @@ HeapRegion::object_iterate_mem_careful(MemRegion mr,
|
|||
HeapWord*
|
||||
HeapRegion::
|
||||
oops_on_card_seq_iterate_careful(MemRegion mr,
|
||||
FilterOutOfRegionClosure* cl) {
|
||||
FilterOutOfRegionClosure* cl,
|
||||
bool filter_young) {
|
||||
G1CollectedHeap* g1h = G1CollectedHeap::heap();
|
||||
|
||||
// If we're within a stop-world GC, then we might look at a card in a
|
||||
|
@ -672,6 +673,16 @@ oops_on_card_seq_iterate_careful(MemRegion mr,
|
|||
if (mr.is_empty()) return NULL;
|
||||
// Otherwise, find the obj that extends onto mr.start().
|
||||
|
||||
// The intersection of the incoming mr (for the card) and the
|
||||
// allocated part of the region is non-empty. This implies that
|
||||
// we have actually allocated into this region. The code in
|
||||
// G1CollectedHeap.cpp that allocates a new region sets the
|
||||
// is_young tag on the region before allocating. Thus we
|
||||
// safely know if this region is young.
|
||||
if (is_young() && filter_young) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// We used to use "block_start_careful" here. But we're actually happy
|
||||
// to update the BOT while we do this...
|
||||
HeapWord* cur = block_start(mr.start());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue