--- a/src/hotspot/share/gc/g1/g1RootClosures.cpp Mon Sep 23 11:36:53 2019 +0200
+++ b/src/hotspot/share/gc/g1/g1RootClosures.cpp Mon Sep 23 11:37:02 2019 +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<G1MarkFromRoot> _strong;
G1SharedClosures<MarkWeak> _weak;
- // Filter method to help with returning the appropriate closures
- // depending on the class template parameter.
- template <G1Mark Mark, typename T>
- 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<G1MarkPromotedFromRoot>(&_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<G1MarkFromRoot>(&_weak._clds); }
-
CodeBlobClosure* strong_codeblobs() { return &_strong._codeblobs; }
CodeBlobClosure* weak_codeblobs() { return &_weak._codeblobs; }