8144584: Change FilterIntoCSClosure to inherit OopClosure
Reviewed-by: kbarrett, mgerdin
--- a/hotspot/src/share/vm/gc/g1/g1OopClosures.hpp Fri Dec 11 17:49:40 2015 +0100
+++ b/hotspot/src/share/vm/gc/g1/g1OopClosures.hpp Fri Dec 11 17:49:40 2015 +0100
@@ -144,20 +144,15 @@
void do_klass(Klass* klass);
};
-class FilterIntoCSClosure: public ExtendedOopClosure {
+class FilterIntoCSClosure: public OopClosure {
G1CollectedHeap* _g1;
OopClosure* _oc;
- DirtyCardToOopClosure* _dcto_cl;
public:
- FilterIntoCSClosure( DirtyCardToOopClosure* dcto_cl,
- G1CollectedHeap* g1,
- OopClosure* oc) :
- _dcto_cl(dcto_cl), _g1(g1), _oc(oc) { }
+ FilterIntoCSClosure(G1CollectedHeap* g1, OopClosure* oc) : _g1(g1), _oc(oc) { }
- template <class T> void do_oop_nv(T* p);
- virtual void do_oop(oop* p) { do_oop_nv(p); }
- virtual void do_oop(narrowOop* p) { do_oop_nv(p); }
- bool apply_to_weak_ref_discovered_field() { return true; }
+ template <class T> void do_oop_work(T* p);
+ virtual void do_oop(oop* p) { do_oop_work(p); }
+ virtual void do_oop(narrowOop* p) { do_oop_work(p); }
};
class FilterOutOfRegionClosure: public ExtendedOopClosure {
--- a/hotspot/src/share/vm/gc/g1/g1OopClosures.inline.hpp Fri Dec 11 17:49:40 2015 +0100
+++ b/hotspot/src/share/vm/gc/g1/g1OopClosures.inline.hpp Fri Dec 11 17:49:40 2015 +0100
@@ -42,7 +42,7 @@
*/
template <class T>
-inline void FilterIntoCSClosure::do_oop_nv(T* p) {
+inline void FilterIntoCSClosure::do_oop_work(T* p) {
T heap_oop = oopDesc::load_heap_oop(p);
if (!oopDesc::is_null(heap_oop) &&
_g1->is_in_cset_or_humongous(oopDesc::decode_heap_oop_not_null(heap_oop))) {
--- a/hotspot/src/share/vm/gc/g1/g1RemSet.cpp Fri Dec 11 17:49:40 2015 +0100
+++ b/hotspot/src/share/vm/gc/g1/g1RemSet.cpp Fri Dec 11 17:49:40 2015 +0100
@@ -448,7 +448,7 @@
update_rs_oop_cl.set_from(r);
G1TriggerClosure trigger_cl;
- FilterIntoCSClosure into_cs_cl(NULL, _g1, &trigger_cl);
+ FilterIntoCSClosure into_cs_cl(_g1, &trigger_cl);
G1InvokeIfNotTriggeredClosure invoke_cl(&trigger_cl, &into_cs_cl);
G1Mux2Closure mux(&invoke_cl, &update_rs_oop_cl);
--- a/hotspot/src/share/vm/gc/g1/g1_specialized_oop_closures.hpp Fri Dec 11 17:49:40 2015 +0100
+++ b/hotspot/src/share/vm/gc/g1/g1_specialized_oop_closures.hpp Fri Dec 11 17:49:40 2015 +0100
@@ -35,7 +35,6 @@
class G1ParScanClosure;
class G1ParPushHeapRSClosure;
-class FilterIntoCSClosure;
class FilterOutOfRegionClosure;
class G1CMOopClosure;
class G1RootRegionScanClosure;
@@ -48,7 +47,6 @@
#define SPECIALIZED_OOP_OOP_ITERATE_CLOSURES_G1(f) \
f(G1ParScanClosure,_nv) \
f(G1ParPushHeapRSClosure,_nv) \
- f(FilterIntoCSClosure,_nv) \
f(FilterOutOfRegionClosure,_nv) \
f(G1CMOopClosure,_nv) \
f(G1RootRegionScanClosure,_nv) \