--- old/src/hotspot/share/gc/g1/g1ParScanThreadState.inline.hpp 2018-10-30 11:38:05.439087116 +0100 +++ new/src/hotspot/share/gc/g1/g1ParScanThreadState.inline.hpp 2018-10-30 11:38:05.007073835 +0100 @@ -114,7 +114,7 @@ } HeapRegion* hr = _g1h->heap_region_containing(to_obj); - _scanner.set_scanning_in_young(hr->is_young()); + G1ScanInYoungSetter x(&_scanner, hr->is_young()); // Process indexes [start,end). It will also process the header // along with the first chunk (i.e., the chunk with start == 0). // Note that at this point the length field of to_obj_array is not