--- old/src/hotspot/share/gc/g1/g1RootClosures.cpp 2019-09-18 17:03:33.997435264 +0200 +++ new/src/hotspot/share/gc/g1/g1RootClosures.cpp 2019-09-18 17:03:33.801434101 +0200 @@ -35,14 +35,13 @@ G1EvacuationClosures(G1CollectedHeap* g1h, G1ParScanThreadState* pss, bool in_young_gc) : - _closures(g1h, pss, in_young_gc, /* cld_claim */ ClassLoaderData::_claim_none) {} + _closures(g1h, pss, in_young_gc) {} OopClosure* weak_oops() { return &_closures._oops; } OopClosure* strong_oops() { return &_closures._oops; } CLDClosure* weak_clds() { return &_closures._clds; } CLDClosure* strong_clds() { return &_closures._clds; } - CLDClosure* second_pass_weak_clds() { return NULL; } CodeBlobClosure* strong_codeblobs() { return &_closures._codeblobs; } CodeBlobClosure* weak_codeblobs() { return &_closures._codeblobs; } @@ -58,33 +57,18 @@ G1SharedClosures _strong; G1SharedClosures _weak; - // Filter method to help with returning the appropriate closures - // depending on the class template parameter. - template - T* null_if(T* t) { - if (Mark == MarkWeak) { - return NULL; - } - return t; - } - public: G1InitialMarkClosures(G1CollectedHeap* g1h, G1ParScanThreadState* pss) : - _strong(g1h, pss, /* process_only_dirty_klasses */ false, /* cld_claim */ ClassLoaderData::_claim_strong), - _weak(g1h, pss, /* process_only_dirty_klasses */ false, /* cld_claim */ ClassLoaderData::_claim_strong) {} + _strong(g1h, pss, /* process_only_dirty_klasses */ false), + _weak(g1h, pss, /* process_only_dirty_klasses */ false) {} OopClosure* weak_oops() { return &_weak._oops; } OopClosure* strong_oops() { return &_strong._oops; } - // If MarkWeak is G1MarkPromotedFromRoot then the weak CLDs must be processed in a second pass. - CLDClosure* weak_clds() { return null_if(&_weak._clds); } + CLDClosure* weak_clds() { return &_weak._clds; } CLDClosure* strong_clds() { return &_strong._clds; } - // If MarkWeak is G1MarkFromRoot then all CLDs are processed by the weak and strong variants - // return a NULL closure for the following specialized versions in that case. - CLDClosure* second_pass_weak_clds() { return null_if(&_weak._clds); } - CodeBlobClosure* strong_codeblobs() { return &_strong._codeblobs; } CodeBlobClosure* weak_codeblobs() { return &_weak._codeblobs; }