--- a/src/hotspot/share/gc/g1/g1ParScanThreadState.cpp Wed Oct 31 13:43:57 2018 +0100
+++ b/src/hotspot/share/gc/g1/g1ParScanThreadState.cpp Wed Oct 31 13:43:57 2018 +0100
@@ -311,8 +311,7 @@
oop* old_p = set_partial_array_mask(old);
do_oop_partial_array(old_p);
} else {
- HeapRegion* const to_region = _g1h->heap_region_containing(obj_ptr);
- _scanner.set_region(to_region);
+ _scanner.set_scanning_in_young(dest_state.is_young());
obj->oop_iterate_backwards(&_scanner);
}
return obj;
@@ -367,7 +366,7 @@
_g1h->preserve_mark_during_evac_failure(_worker_id, old, m);
- _scanner.set_region(r);
+ _scanner.set_scanning_in_young(r->is_young());
old->oop_iterate_backwards(&_scanner);
return old;