8200292: Move PushAndMarkVerifyClosure::do_oop_work to concurrentMarkSweepGeneration.cpp
authorstefank
Mon, 26 Mar 2018 17:01:32 +0200
changeset 49631 2520a95cddf7
parent 49630 2f1b308b4469
child 49632 64f9ebc85e67
8200292: Move PushAndMarkVerifyClosure::do_oop_work to concurrentMarkSweepGeneration.cpp Reviewed-by: tschatzl, sjohanss
src/hotspot/share/gc/cms/concurrentMarkSweepGeneration.cpp
src/hotspot/share/gc/cms/concurrentMarkSweepGeneration.hpp
--- a/src/hotspot/share/gc/cms/concurrentMarkSweepGeneration.cpp	Wed Mar 28 11:38:47 2018 +0200
+++ b/src/hotspot/share/gc/cms/concurrentMarkSweepGeneration.cpp	Mon Mar 26 17:01:32 2018 +0200
@@ -62,6 +62,7 @@
 #include "memory/iterator.inline.hpp"
 #include "memory/padded.hpp"
 #include "memory/resourceArea.hpp"
+#include "oops/access.inline.hpp"
 #include "oops/oop.inline.hpp"
 #include "prims/jvmtiExport.hpp"
 #include "runtime/atomic.hpp"
@@ -6638,6 +6639,11 @@
   _mark_stack(mark_stack)
 { }
 
+template <class T> void PushAndMarkVerifyClosure::do_oop_work(T *p) {
+  oop obj = RawAccess<>::oop_load(p);
+  do_oop(obj);
+}
+
 void PushAndMarkVerifyClosure::do_oop(oop* p)       { PushAndMarkVerifyClosure::do_oop_work(p); }
 void PushAndMarkVerifyClosure::do_oop(narrowOop* p) { PushAndMarkVerifyClosure::do_oop_work(p); }
 
--- a/src/hotspot/share/gc/cms/concurrentMarkSweepGeneration.hpp	Wed Mar 28 11:38:47 2018 +0200
+++ b/src/hotspot/share/gc/cms/concurrentMarkSweepGeneration.hpp	Mon Mar 26 17:01:32 2018 +0200
@@ -38,7 +38,6 @@
 #include "logging/log.hpp"
 #include "memory/iterator.hpp"
 #include "memory/virtualspace.hpp"
-#include "oops/access.inline.hpp"
 #include "runtime/mutexLocker.hpp"
 #include "services/memoryService.hpp"
 #include "utilities/bitMap.hpp"
@@ -1320,10 +1319,8 @@
   CMSMarkStack*    _mark_stack;
  protected:
   void do_oop(oop p);
-  template <class T> inline void do_oop_work(T *p) {
-    oop obj = RawAccess<>::oop_load(p);
-    do_oop(obj);
-  }
+  template <class T> void do_oop_work(T *p);
+
  public:
   PushAndMarkVerifyClosure(CMSCollector* cms_collector,
                            MemRegion span,