< prev index next >

src/hotspot/share/gc/g1/g1CollectedHeap.cpp

Print this page
rev 52310 : imported patch 8071913-almost-done
rev 52311 : imported patch 8071913-kbarrett-review

*** 2669,2686 **** while (hrrs.has_next(card_index)) { jbyte* card_ptr = (jbyte*)ct->byte_for_index(card_index); // The remembered set might contain references to already freed // regions. Filter out such entries to avoid failing card table // verification. ! if (!g1h->is_in_closed_subset(ct->addr_for(card_ptr))) { ! continue; ! } if (*card_ptr != G1CardTable::dirty_card_val()) { *card_ptr = G1CardTable::dirty_card_val(); _dcq.enqueue(card_ptr); } } // We should only clear the card based remembered set here as we will not // implicitly rebuild anything else during eager reclaim. Note that at the moment // (and probably never) we do not enter this path if there are other kind of // remembered sets for this region. r->rem_set()->clear_locked(true /* only_cardset */); --- 2669,2688 ---- while (hrrs.has_next(card_index)) { jbyte* card_ptr = (jbyte*)ct->byte_for_index(card_index); // The remembered set might contain references to already freed // regions. Filter out such entries to avoid failing card table // verification. ! if (g1h->is_in_closed_subset(ct->addr_for(card_ptr))) { if (*card_ptr != G1CardTable::dirty_card_val()) { *card_ptr = G1CardTable::dirty_card_val(); _dcq.enqueue(card_ptr); } } + } + assert(hrrs.n_yielded() == r->rem_set()->occupied(), + "Remembered set hash maps out of sync, cur: " SIZE_FORMAT " entries, next: " SIZE_FORMAT " entries", + hrrs.n_yielded(), r->rem_set()->occupied()); // We should only clear the card based remembered set here as we will not // implicitly rebuild anything else during eager reclaim. Note that at the moment // (and probably never) we do not enter this path if there are other kind of // remembered sets for this region. r->rem_set()->clear_locked(true /* only_cardset */);
< prev index next >