8142399: G1ParCopyClosure does not need do_oop_work
authorehelin
Fri, 11 Sep 2015 15:18:43 +0200
changeset 34245 8ab9cefd6373
parent 34244 1cc8705dd350
child 34246 d2c05216f375
child 34247 f91af85bcb5f
child 34249 a015a11067a2
8142399: G1ParCopyClosure does not need do_oop_work Reviewed-by: stefank, tschatzl
hotspot/src/share/vm/gc/g1/g1OopClosures.hpp
hotspot/src/share/vm/gc/g1/g1OopClosures.inline.hpp
--- a/hotspot/src/share/vm/gc/g1/g1OopClosures.hpp	Fri Nov 20 03:22:36 2015 +0000
+++ b/hotspot/src/share/vm/gc/g1/g1OopClosures.hpp	Fri Sep 11 15:18:43 2015 +0200
@@ -123,16 +123,13 @@
 
 template <G1Barrier barrier, G1Mark do_mark_object>
 class G1ParCopyClosure : public G1ParCopyHelper {
-private:
-  template <class T> void do_oop_work(T* p);
-
 public:
   G1ParCopyClosure(G1CollectedHeap* g1, G1ParScanThreadState* par_scan_state) :
       G1ParCopyHelper(g1, par_scan_state) {
     assert(ref_processor() == NULL, "sanity");
   }
 
-  template <class T> void do_oop_nv(T* p) { do_oop_work(p); }
+  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); }
 };
--- a/hotspot/src/share/vm/gc/g1/g1OopClosures.inline.hpp	Fri Nov 20 03:22:36 2015 +0000
+++ b/hotspot/src/share/vm/gc/g1/g1OopClosures.inline.hpp	Fri Sep 11 15:18:43 2015 +0200
@@ -251,7 +251,7 @@
 
 template <G1Barrier barrier, G1Mark do_mark_object>
 template <class T>
-void G1ParCopyClosure<barrier, do_mark_object>::do_oop_work(T* p) {
+void G1ParCopyClosure<barrier, do_mark_object>::do_oop_nv(T* p) {
   T heap_oop = oopDesc::load_heap_oop(p);
 
   if (oopDesc::is_null(heap_oop)) {