src/share/vm/gc_implementation/g1/g1RemSet.cpp

changeset 7647
80ac3ee51955
parent 7218
6948da6d7c13
child 7655
8e9ede9dd2cd
equal deleted inserted replaced
7646:5743a702da65 7647:80ac3ee51955
145 CardTableModRefBS::Precise, 145 CardTableModRefBS::Precise,
146 HeapRegionDCTOC::IntoCSFilterKind); 146 HeapRegionDCTOC::IntoCSFilterKind);
147 147
148 // Set the "from" region in the closure. 148 // Set the "from" region in the closure.
149 _oc->set_region(r); 149 _oc->set_region(r);
150 HeapWord* card_start = _bot_shared->address_for_index(index); 150 MemRegion card_region(_bot_shared->address_for_index(index), G1BlockOffsetSharedArray::N_words);
151 HeapWord* card_end = card_start + G1BlockOffsetSharedArray::N_words; 151 MemRegion pre_gc_allocated(r->bottom(), r->scan_top());
152 Space *sp = SharedHeap::heap()->space_containing(card_start); 152 MemRegion mr = pre_gc_allocated.intersection(card_region);
153 MemRegion sm_region = sp->used_region_at_save_marks();
154 MemRegion mr = sm_region.intersection(MemRegion(card_start,card_end));
155 if (!mr.is_empty() && !_ct_bs->is_card_claimed(index)) { 153 if (!mr.is_empty() && !_ct_bs->is_card_claimed(index)) {
156 // We make the card as "claimed" lazily (so races are possible 154 // We make the card as "claimed" lazily (so races are possible
157 // but they're benign), which reduces the number of duplicate 155 // but they're benign), which reduces the number of duplicate
158 // scans (the rsets of the regions in the cset can intersect). 156 // scans (the rsets of the regions in the cset can intersect).
159 _ct_bs->set_card_claimed(index); 157 _ct_bs->set_card_claimed(index);

mercurial