comparison src/share/vm/gc_implementation/g1/heapRegion.cpp @ 1666:5cbac8938c4c

6956639: G1: assert(cached_ptr != card_ptr) failed: shouldn't be, concurrentG1Refine.cpp:307 Summary: 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
author johnc
date Mon, 19 Jul 2010 11:06:34 -0700
parents c18cbe5936b8
children 2d160770d2e5
comparison
equal deleted inserted replaced
1665:a93a9eda13f7 1666:5cbac8938c4c
656 } 656 }
657 657
658 HeapWord* 658 HeapWord*
659 HeapRegion:: 659 HeapRegion::
660 oops_on_card_seq_iterate_careful(MemRegion mr, 660 oops_on_card_seq_iterate_careful(MemRegion mr,
661 FilterOutOfRegionClosure* cl) { 661 FilterOutOfRegionClosure* cl,
662 bool filter_young) {
662 G1CollectedHeap* g1h = G1CollectedHeap::heap(); 663 G1CollectedHeap* g1h = G1CollectedHeap::heap();
663 664
664 // If we're within a stop-world GC, then we might look at a card in a 665 // If we're within a stop-world GC, then we might look at a card in a
665 // GC alloc region that extends onto a GC LAB, which may not be 666 // GC alloc region that extends onto a GC LAB, which may not be
666 // parseable. Stop such at the "saved_mark" of the region. 667 // parseable. Stop such at the "saved_mark" of the region.
669 } else { 670 } else {
670 mr = mr.intersection(used_region()); 671 mr = mr.intersection(used_region());
671 } 672 }
672 if (mr.is_empty()) return NULL; 673 if (mr.is_empty()) return NULL;
673 // Otherwise, find the obj that extends onto mr.start(). 674 // Otherwise, find the obj that extends onto mr.start().
675
676 // The intersection of the incoming mr (for the card) and the
677 // allocated part of the region is non-empty. This implies that
678 // we have actually allocated into this region. The code in
679 // G1CollectedHeap.cpp that allocates a new region sets the
680 // is_young tag on the region before allocating. Thus we
681 // safely know if this region is young.
682 if (is_young() && filter_young) {
683 return NULL;
684 }
674 685
675 // We used to use "block_start_careful" here. But we're actually happy 686 // We used to use "block_start_careful" here. But we're actually happy
676 // to update the BOT while we do this... 687 // to update the BOT while we do this...
677 HeapWord* cur = block_start(mr.start()); 688 HeapWord* cur = block_start(mr.start());
678 assert(cur <= mr.start(), "Postcondition"); 689 assert(cur <= mr.start(), "Postcondition");