--- old/src/hotspot/share/gc/g1/g1OopClosures.hpp 2018-10-25 11:37:27.033484705 +0200 +++ new/src/hotspot/share/gc/g1/g1OopClosures.hpp 2018-10-25 11:37:26.614471796 +0200 @@ -43,7 +43,6 @@ protected: G1CollectedHeap* _g1h; G1ParScanThreadState* _par_scan_state; - bool _from_is_young; G1ScanClosureBase(G1CollectedHeap* g1h, G1ParScanThreadState* par_scan_state); ~G1ScanClosureBase() { } @@ -56,8 +55,6 @@ public: virtual ReferenceIterationMode reference_iteration_mode() { return DO_FIELDS; } - void set_from_is_young(bool from_is_young) { _from_is_young = from_is_young; } - inline void trim_queue_partially(); }; @@ -87,9 +84,13 @@ // This closure is applied to the fields of the objects that have just been copied during evacuation. class G1ScanEvacuatedObjClosure : public G1ScanClosureBase { + bool _scanning_in_young; + public: G1ScanEvacuatedObjClosure(G1CollectedHeap* g1h, G1ParScanThreadState* par_scan_state) : - G1ScanClosureBase(g1h, par_scan_state) { } + G1ScanClosureBase(g1h, par_scan_state), _scanning_in_young(false) { } + + void set_scanning_in_young(bool scanning_in_young) { _scanning_in_young = scanning_in_young; } template void do_oop_work(T* p); virtual void do_oop(oop* p) { do_oop_work(p); }