8144701: Change three G1 remembererd set closures to be OopClosures
authorsjohanss
Fri, 11 Dec 2015 17:49:41 +0100
changeset 35069 24d8a63c9486
parent 35068 b0d5016aecc7
child 35070 1a30c4d1f1c5
8144701: Change three G1 remembererd set closures to be OopClosures Reviewed-by: mgerdin, stefank
hotspot/src/share/vm/gc/g1/g1OopClosures.hpp
hotspot/src/share/vm/gc/g1/g1OopClosures.inline.hpp
hotspot/src/share/vm/gc/g1/g1_specialized_oop_closures.hpp
--- 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:41 2015 +0100
@@ -201,40 +201,40 @@
 // during an evacuation pause) to record cards containing
 // pointers into the collection set.
 
-class G1Mux2Closure : public ExtendedOopClosure {
+class G1Mux2Closure : public OopClosure {
   OopClosure* _c1;
   OopClosure* _c2;
 public:
   G1Mux2Closure(OopClosure *c1, OopClosure *c2);
-  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); }
+  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); }
 };
 
 // A closure that returns true if it is actually applied
 // to a reference
 
-class G1TriggerClosure : public ExtendedOopClosure {
+class G1TriggerClosure : public OopClosure {
   bool _triggered;
 public:
   G1TriggerClosure();
   bool triggered() const { return _triggered; }
-  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); }
+  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); }
 };
 
 // A closure which uses a triggering closure to determine
 // whether to apply an oop closure.
 
-class G1InvokeIfNotTriggeredClosure: public ExtendedOopClosure {
+class G1InvokeIfNotTriggeredClosure: public OopClosure {
   G1TriggerClosure* _trigger_cl;
   OopClosure* _oop_cl;
 public:
   G1InvokeIfNotTriggeredClosure(G1TriggerClosure* t, OopClosure* 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); }
+  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 G1UpdateRSOrPushRefOopClosure: public OopClosure {
--- 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:41 2015 +0100
@@ -136,20 +136,20 @@
 }
 
 template <class T>
-inline void G1Mux2Closure::do_oop_nv(T* p) {
+inline void G1Mux2Closure::do_oop_work(T* p) {
   // Apply first closure; then apply the second.
   _c1->do_oop(p);
   _c2->do_oop(p);
 }
 
 template <class T>
-inline void G1TriggerClosure::do_oop_nv(T* p) {
+inline void G1TriggerClosure::do_oop_work(T* p) {
   // Record that this closure was actually applied (triggered).
   _triggered = true;
 }
 
 template <class T>
-inline void G1InvokeIfNotTriggeredClosure::do_oop_nv(T* p) {
+inline void G1InvokeIfNotTriggeredClosure::do_oop_work(T* p) {
   if (!_trigger_cl->triggered()) {
     _oop_cl->do_oop(p);
   }
--- 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:41 2015 +0100
@@ -39,19 +39,11 @@
 class G1CMOopClosure;
 class G1RootRegionScanClosure;
 
-// Specialized oop closures from g1RemSet.cpp
-class G1Mux2Closure;
-class G1TriggerClosure;
-class G1InvokeIfNotTriggeredClosure;
-
 #define SPECIALIZED_OOP_OOP_ITERATE_CLOSURES_G1(f) \
       f(G1ParScanClosure,_nv)                      \
       f(G1ParPushHeapRSClosure,_nv)                \
       f(FilterOutOfRegionClosure,_nv)              \
       f(G1CMOopClosure,_nv)                        \
-      f(G1RootRegionScanClosure,_nv)               \
-      f(G1Mux2Closure,_nv)                         \
-      f(G1TriggerClosure,_nv)                      \
-      f(G1InvokeIfNotTriggeredClosure,_nv)
+      f(G1RootRegionScanClosure,_nv)
 
 #endif // SHARE_VM_GC_G1_G1_SPECIALIZED_OOP_CLOSURES_HPP