< prev index next >

src/hotspot/share/gc/shenandoah/shenandoahRootProcessor.hpp

Print this page

        

@@ -54,26 +54,16 @@
   ShenandoahSerialRoot  _universe_root;
   ShenandoahSerialRoot  _object_synchronizer_root;
   ShenandoahSerialRoot  _management_root;
   ShenandoahSerialRoot  _system_dictionary_root;
   ShenandoahSerialRoot  _jvmti_root;
+  ShenandoahSerialRoot  _jni_handle_root;
 public:
   ShenandoahSerialRoots();
   void oops_do(OopClosure* cl, uint worker_id);
 };
 
-template <bool CONCURRENT>
-class ShenandoahJNIHandleRoots {
-private:
-  OopStorage::ParState<CONCURRENT, false /* is_const */> _itr;
-public:
-  ShenandoahJNIHandleRoots();
-
-  template <typename T>
-  void oops_do(T* cl, uint worker_id = 0);
-};
-
 class ShenandoahThreadRoots {
 private:
   const bool _is_par;
 public:
   ShenandoahThreadRoots(bool is_par);

@@ -112,11 +102,10 @@
   ~ShenandoahCodeCacheRoots();
 
   void code_blobs_do(CodeBlobClosure* blob_cl, uint worker_id);
 };
 
-template <bool SINGLE_THREADED>
 class ShenandoahClassLoaderDataRoots {
 public:
   ShenandoahClassLoaderDataRoots();
 
   void clds_do(CLDClosure* strong_clds, CLDClosure* weak_clds, uint worker_id);

@@ -134,15 +123,14 @@
 };
 
 template <typename ITR>
 class ShenandoahRootScanner : public ShenandoahRootProcessor {
 private:
-  ShenandoahSerialRoots                                     _serial_roots;
-  ShenandoahThreadRoots                                     _thread_roots;
-  ShenandoahCodeCacheRoots<ITR>                             _code_roots;
-  ShenandoahJNIHandleRoots<false /*concurrent*/ >           _jni_roots;
-  ShenandoahClassLoaderDataRoots<false /*single threaded*/> _cld_roots;
+  ShenandoahSerialRoots          _serial_roots;
+  ShenandoahClassLoaderDataRoots _cld_roots;
+  ShenandoahThreadRoots          _thread_roots;
+  ShenandoahCodeCacheRoots<ITR>  _code_roots;
 public:
   ShenandoahRootScanner(uint n_workers, ShenandoahPhaseTimings::Phase phase);
 
   // Apply oops, clds and blobs to all strongly reachable roots in the system,
   // during class unloading cycle

@@ -156,56 +144,36 @@
 };
 
 typedef ShenandoahRootScanner<ShenandoahAllCodeRootsIterator> ShenandoahAllRootScanner;
 typedef ShenandoahRootScanner<ShenandoahCsetCodeRootsIterator> ShenandoahCSetRootScanner;
 
-// This scanner is only for SH::object_iteration() and only supports single-threaded
-// root scanning
-class ShenandoahHeapIterationRootScanner : public ShenandoahRootProcessor {
-private:
-  ShenandoahSerialRoots                                    _serial_roots;
-  ShenandoahThreadRoots                                    _thread_roots;
-  ShenandoahJNIHandleRoots<false /*concurrent*/>           _jni_roots;
-  ShenandoahClassLoaderDataRoots<true /*single threaded*/> _cld_roots;
-  ShenandoahCodeCacheRoots<ShenandoahAllCodeRootsIterator> _code_roots;
-
-public:
-  ShenandoahHeapIterationRootScanner();
-
-  void roots_do(OopClosure* cl);
-  void strong_roots_do(OopClosure* cl);
-};
-
 // Evacuate all roots at a safepoint
 class ShenandoahRootEvacuator : public ShenandoahRootProcessor {
 private:
-  ShenandoahSerialRoots                                     _serial_roots;
-  ShenandoahJNIHandleRoots<false /*concurrent*/>            _jni_roots;
-  ShenandoahClassLoaderDataRoots<false /*single threaded*/> _cld_roots;
-  ShenandoahThreadRoots                                     _thread_roots;
-  ShenandoahWeakRoots                                       _weak_roots;
-  ShenandoahStringDedupRoots                                _dedup_roots;
+  ShenandoahSerialRoots          _serial_roots;
+  ShenandoahClassLoaderDataRoots _cld_roots;
+  ShenandoahThreadRoots          _thread_roots;
+  ShenandoahWeakRoots            _weak_roots;
+  ShenandoahStringDedupRoots     _dedup_roots;
   ShenandoahCodeCacheRoots<ShenandoahCsetCodeRootsIterator> _code_roots;
-  bool                                                      _include_concurrent_roots;
 
 public:
-  ShenandoahRootEvacuator(uint n_workers, ShenandoahPhaseTimings::Phase phase, bool include_concurrent_roots);
+  ShenandoahRootEvacuator(uint n_workers, ShenandoahPhaseTimings::Phase phase);
 
   void roots_do(uint worker_id, OopClosure* oops);
 };
 
 // Update all roots at a safepoint
 class ShenandoahRootUpdater : public ShenandoahRootProcessor {
 private:
-  ShenandoahSerialRoots                                     _serial_roots;
-  ShenandoahJNIHandleRoots<false /*concurrent*/>            _jni_roots;
-  ShenandoahClassLoaderDataRoots<false /*single threaded*/> _cld_roots;
-  ShenandoahThreadRoots                                     _thread_roots;
-  ShenandoahWeakRoots                                       _weak_roots;
-  ShenandoahStringDedupRoots                                _dedup_roots;
+  ShenandoahSerialRoots          _serial_roots;
+  ShenandoahClassLoaderDataRoots _cld_roots;
+  ShenandoahThreadRoots          _thread_roots;
+  ShenandoahWeakRoots            _weak_roots;
+  ShenandoahStringDedupRoots     _dedup_roots;
   ShenandoahCodeCacheRoots<ShenandoahCsetCodeRootsIterator> _code_roots;
-  const bool                                                _update_code_cache;
+  const bool                     _update_code_cache;
 
 public:
   ShenandoahRootUpdater(uint n_workers, ShenandoahPhaseTimings::Phase phase, bool update_code_cache);
 
   template<typename IsAlive, typename KeepAlive>

@@ -213,17 +181,16 @@
 };
 
 // Adjuster all roots at a safepoint during full gc
 class ShenandoahRootAdjuster : public ShenandoahRootProcessor {
 private:
-  ShenandoahSerialRoots                                     _serial_roots;
-  ShenandoahJNIHandleRoots<false /*concurrent*/>            _jni_roots;
-  ShenandoahClassLoaderDataRoots<false /*single threaded*/> _cld_roots;
-  ShenandoahThreadRoots                                     _thread_roots;
-  ShenandoahWeakRoots                                       _weak_roots;
-  ShenandoahStringDedupRoots                                _dedup_roots;
-  ShenandoahCodeCacheRoots<ShenandoahAllCodeRootsIterator>  _code_roots;
+  ShenandoahSerialRoots          _serial_roots;
+  ShenandoahClassLoaderDataRoots _cld_roots;
+  ShenandoahThreadRoots          _thread_roots;
+  ShenandoahWeakRoots            _weak_roots;
+  ShenandoahStringDedupRoots     _dedup_roots;
+  ShenandoahCodeCacheRoots<ShenandoahAllCodeRootsIterator> _code_roots;
 
 public:
   ShenandoahRootAdjuster(uint n_workers, ShenandoahPhaseTimings::Phase phase);
 
   void roots_do(uint worker_id, OopClosure* oops);
< prev index next >