8144040: UpdateRSetDeferred in G1EvacFailure will never visit survivor regions
Reviewed-by: tschatzl, mgerdin
--- a/hotspot/src/share/vm/gc/g1/g1EvacFailure.cpp Wed Apr 29 13:17:46 2015 +0200
+++ b/hotspot/src/share/vm/gc/g1/g1EvacFailure.cpp Sun Nov 29 15:08:40 2015 +0100
@@ -47,8 +47,9 @@
virtual void do_oop( oop* p) { do_oop_work(p); }
template <class T> void do_oop_work(T* p) {
assert(_from->is_in_reserved(p), "paranoia");
- if (!_from->is_in_reserved(oopDesc::load_decode_heap_oop(p)) &&
- !_from->is_survivor()) {
+ assert(!_from->is_survivor(), "Unexpected evac failure in survivor region");
+
+ if (!_from->is_in_reserved(oopDesc::load_decode_heap_oop(p))) {
size_t card_index = _ct_bs->index_for(p);
if (_ct_bs->mark_card_deferred(card_index)) {
_dcq->enqueue((jbyte*)_ct_bs->byte_for_index(card_index));