changeset 51255:4216de02077e

8204538: Split ScanClosure and ScanClosureWithParBarrier Reviewed-by: eosterlund, tschatzl, kbarrett
author stefank
date Thu, 07 Jun 2018 10:11:36 +0200
parents 2b7714a592a1
children 21b96ce2ed10
files src/hotspot/share/gc/cms/parNewGeneration.cpp src/hotspot/share/gc/cms/parNewGeneration.hpp src/hotspot/share/gc/shared/genOopClosures.hpp
diffstat 3 files changed, 9 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/hotspot/share/gc/cms/parNewGeneration.cpp	Mon Jun 18 18:49:34 2018 -0700
+++ b/src/hotspot/share/gc/cms/parNewGeneration.cpp	Thu Jun 07 10:11:36 2018 +0200
@@ -816,7 +816,7 @@
 
 ScanClosureWithParBarrier::
 ScanClosureWithParBarrier(ParNewGeneration* g, bool gc_barrier) :
-  ScanClosure(g, gc_barrier)
+  OopsInClassLoaderDataOrGenClosure(g), _g(g), _boundary(g->reserved().end()), _gc_barrier(gc_barrier)
 { }
 
 template <typename OopClosureType1, typename OopClosureType2>
--- a/src/hotspot/share/gc/cms/parNewGeneration.hpp	Mon Jun 18 18:49:34 2018 -0700
+++ b/src/hotspot/share/gc/cms/parNewGeneration.hpp	Thu Jun 07 10:11:36 2018 +0200
@@ -275,9 +275,14 @@
 
 // Closure for scanning ParNewGeneration.
 // Same as ScanClosure, except does parallel GC barrier.
-class ScanClosureWithParBarrier: public ScanClosure {
- protected:
+class ScanClosureWithParBarrier: public OopsInClassLoaderDataOrGenClosure {
+ private:
+  ParNewGeneration* _g;
+  HeapWord*         _boundary;
+  bool              _gc_barrier;
+
   template <class T> void do_oop_work(T* p);
+
  public:
   ScanClosureWithParBarrier(ParNewGeneration* g, bool gc_barrier);
   virtual void do_oop(oop* p);
--- a/src/hotspot/share/gc/shared/genOopClosures.hpp	Mon Jun 18 18:49:34 2018 -0700
+++ b/src/hotspot/share/gc/shared/genOopClosures.hpp	Thu Jun 07 10:11:36 2018 +0200
@@ -101,7 +101,7 @@
 // This closure will perform barrier store calls for ALL
 // pointers in scanned oops.
 class ScanClosure: public OopsInClassLoaderDataOrGenClosure {
- protected:
+ private:
   DefNewGeneration* _g;
   HeapWord*         _boundary;
   bool              _gc_barrier;