equal
deleted
inserted
replaced
217 bool doHeapRegion(HeapRegion* r) { |
217 bool doHeapRegion(HeapRegion* r) { |
218 assert(r->in_collection_set(), "should only be called on elements of CS."); |
218 assert(r->in_collection_set(), "should only be called on elements of CS."); |
219 HeapRegionRemSet* hrrs = r->rem_set(); |
219 HeapRegionRemSet* hrrs = r->rem_set(); |
220 if (hrrs->iter_is_complete()) return false; // All done. |
220 if (hrrs->iter_is_complete()) return false; // All done. |
221 if (!_try_claimed && !hrrs->claim_iter()) return false; |
221 if (!_try_claimed && !hrrs->claim_iter()) return false; |
|
222 _g1h->push_dirty_cards_region(r); |
222 // If we didn't return above, then |
223 // If we didn't return above, then |
223 // _try_claimed || r->claim_iter() |
224 // _try_claimed || r->claim_iter() |
224 // is true: either we're supposed to work on claimed-but-not-complete |
225 // is true: either we're supposed to work on claimed-but-not-complete |
225 // regions, or we successfully claimed the region. |
226 // regions, or we successfully claimed the region. |
226 HeapRegionRemSetIterator* iter = _g1h->rem_set_iterator(_worker_i); |
227 HeapRegionRemSetIterator* iter = _g1h->rem_set_iterator(_worker_i); |
239 #endif |
240 #endif |
240 |
241 |
241 HeapRegion* card_region = _g1h->heap_region_containing(card_start); |
242 HeapRegion* card_region = _g1h->heap_region_containing(card_start); |
242 assert(card_region != NULL, "Yielding cards not in the heap?"); |
243 assert(card_region != NULL, "Yielding cards not in the heap?"); |
243 _cards++; |
244 _cards++; |
|
245 |
|
246 if (!card_region->is_on_dirty_cards_region_list()) { |
|
247 _g1h->push_dirty_cards_region(card_region); |
|
248 } |
244 |
249 |
245 // If the card is dirty, then we will scan it during updateRS. |
250 // If the card is dirty, then we will scan it during updateRS. |
246 if (!card_region->in_collection_set() && !_ct_bs->is_card_dirty(card_index)) { |
251 if (!card_region->in_collection_set() && !_ct_bs->is_card_dirty(card_index)) { |
247 if (!_ct_bs->is_card_claimed(card_index) && _ct_bs->claim_card(card_index)) { |
252 if (!_ct_bs->is_card_claimed(card_index) && _ct_bs->claim_card(card_index)) { |
248 scanCard(card_index, card_region); |
253 scanCard(card_index, card_region); |