8144486: Change G1UpdateRSOrPushRefOopClosure to inherit OopClosure
Reviewed-by: mgerdin, stefank
--- a/hotspot/src/share/vm/gc/g1/g1OopClosures.hpp Thu Dec 10 14:57:55 2015 +0100
+++ b/hotspot/src/share/vm/gc/g1/g1OopClosures.hpp Fri Dec 11 09:08:08 2015 +0100
@@ -242,7 +242,7 @@
virtual void do_oop(narrowOop* p) { do_oop_nv(p); }
};
-class G1UpdateRSOrPushRefOopClosure: public ExtendedOopClosure {
+class G1UpdateRSOrPushRefOopClosure: public OopClosure {
G1CollectedHeap* _g1;
G1RemSet* _g1_rem_set;
HeapRegion* _from;
@@ -268,11 +268,9 @@
return result;
}
- bool apply_to_weak_ref_discovered_field() { return true; }
-
- template <class T> void do_oop_nv(T* p);
- virtual void do_oop(narrowOop* p) { do_oop_nv(p); }
- virtual void do_oop(oop* p) { do_oop_nv(p); }
+ template <class T> void do_oop_work(T* p);
+ virtual void do_oop(narrowOop* p) { do_oop_work(p); }
+ virtual void do_oop(oop* p) { do_oop_work(p); }
};
#endif // SHARE_VM_GC_G1_G1OOPCLOSURES_HPP
--- a/hotspot/src/share/vm/gc/g1/g1OopClosures.inline.hpp Thu Dec 10 14:57:55 2015 +0100
+++ b/hotspot/src/share/vm/gc/g1/g1OopClosures.inline.hpp Fri Dec 11 09:08:08 2015 +0100
@@ -156,7 +156,7 @@
}
template <class T>
-inline void G1UpdateRSOrPushRefOopClosure::do_oop_nv(T* p) {
+inline void G1UpdateRSOrPushRefOopClosure::do_oop_work(T* p) {
oop obj = oopDesc::load_decode_heap_oop(p);
if (obj == NULL) {
return;
--- a/hotspot/src/share/vm/gc/g1/g1_specialized_oop_closures.hpp Thu Dec 10 14:57:55 2015 +0100
+++ b/hotspot/src/share/vm/gc/g1/g1_specialized_oop_closures.hpp Fri Dec 11 09:08:08 2015 +0100
@@ -44,7 +44,6 @@
class G1Mux2Closure;
class G1TriggerClosure;
class G1InvokeIfNotTriggeredClosure;
-class G1UpdateRSOrPushRefOopClosure;
#define SPECIALIZED_OOP_OOP_ITERATE_CLOSURES_G1(f) \
f(G1ParScanClosure,_nv) \
@@ -55,7 +54,6 @@
f(G1RootRegionScanClosure,_nv) \
f(G1Mux2Closure,_nv) \
f(G1TriggerClosure,_nv) \
- f(G1InvokeIfNotTriggeredClosure,_nv) \
- f(G1UpdateRSOrPushRefOopClosure,_nv)
+ f(G1InvokeIfNotTriggeredClosure,_nv)
#endif // SHARE_VM_GC_G1_G1_SPECIALIZED_OOP_CLOSURES_HPP