--- old/src/share/vm/gc/g1/g1OopClosures.inline.hpp 2015-12-04 15:40:33.288451029 +0100 +++ new/src/share/vm/gc/g1/g1OopClosures.inline.hpp 2015-12-04 15:40:33.196447221 +0100 @@ -90,6 +90,8 @@ } else { if (state.is_humongous()) { _g1->set_humongous_is_live(obj); + } else if (state.is_ext()) { + _par_scan_state->do_oop_ext(p); } _par_scan_state->update_rs(_from, p, obj); } @@ -102,12 +104,15 @@ if (!oopDesc::is_null(heap_oop)) { oop obj = oopDesc::decode_heap_oop_not_null(heap_oop); - if (_g1->is_in_cset_or_humongous(obj)) { + const InCSetState state = _g1->in_cset_state(obj); + if (state.is_in_cset_or_humongous()) { Prefetch::write(obj->mark_addr(), 0); Prefetch::read(obj->mark_addr(), (HeapWordSize*2)); // Place on the references queue _par_scan_state->push_on_queue(p); + } else if (state.is_ext()) { + _par_scan_state->do_oop_ext(p); } else { assert(!_g1->obj_in_cs(obj), "checking"); } @@ -249,9 +254,9 @@ _cm->grayRoot(to_obj, (size_t) from_obj->size(), _worker_id); } -template +template template -void G1ParCopyClosure::do_oop_nv(T* p) { +void G1ParCopyClosure::do_oop_nv(T* p) { T heap_oop = oopDesc::load_heap_oop(p); if (oopDesc::is_null(heap_oop)) { @@ -286,6 +291,10 @@ if (state.is_humongous()) { _g1->set_humongous_is_live(obj); } + + if (use_ext && state.is_ext()) { + _par_scan_state->do_oop_ext(p); + } // The object is not in collection set. If we're a root scanning // closure during an initial mark pause then attempt to mark the object. if (do_mark_object == G1MarkFromRoot) {