src/hotspot/share/gc/shenandoah/shenandoahRootProcessor.hpp
changeset 59296 9186be5c78ba
parent 58686 0279391875bf
equal deleted inserted replaced
59295:8b6cc0bb93d0 59296:9186be5c78ba
   275                                                             _cld_roots;
   275                                                             _cld_roots;
   276   ShenandoahThreadRoots                                     _thread_roots;
   276   ShenandoahThreadRoots                                     _thread_roots;
   277   ShenandoahSerialWeakRoots                                 _serial_weak_roots;
   277   ShenandoahSerialWeakRoots                                 _serial_weak_roots;
   278   ShenandoahWeakRoots<false /*concurrent*/>                 _weak_roots;
   278   ShenandoahWeakRoots<false /*concurrent*/>                 _weak_roots;
   279   ShenandoahStringDedupRoots                                _dedup_roots;
   279   ShenandoahStringDedupRoots                                _dedup_roots;
   280   ShenandoahCodeCacheRoots<ShenandoahCsetCodeRootsIterator> _code_roots;
   280   ShenandoahCodeCacheRoots<ShenandoahAllCodeRootsIterator>  _code_roots;
   281   bool                                                      _include_concurrent_roots;
   281   bool                                                      _include_concurrent_roots;
   282 
   282   bool                                                      _include_concurrent_code_roots;
   283 public:
   283 public:
   284   ShenandoahRootEvacuator(uint n_workers, ShenandoahPhaseTimings::Phase phase, bool include_concurrent_roots);
   284   ShenandoahRootEvacuator(uint n_workers, ShenandoahPhaseTimings::Phase phase,
       
   285                           bool include_concurrent_roots, bool _include_concurrent_code_roots);
   285 
   286 
   286   void roots_do(uint worker_id, OopClosure* oops);
   287   void roots_do(uint worker_id, OopClosure* oops);
   287 };
   288 };
   288 
   289 
   289 // Update all roots at a safepoint
   290 // Update all roots at a safepoint
   290 class ShenandoahRootUpdater : public ShenandoahRootProcessor {
   291 class ShenandoahRootUpdater : public ShenandoahRootProcessor {
   291 private:
       
   292   ShenandoahSerialRoots                                     _serial_roots;
       
   293   ShenandoahVMRoots<false /*concurrent*/>                   _vm_roots;
       
   294   ShenandoahClassLoaderDataRoots<false /*concurrent*/, false /*single threaded*/>
       
   295                                                             _cld_roots;
       
   296   ShenandoahThreadRoots                                     _thread_roots;
       
   297   ShenandoahSerialWeakRoots                                 _serial_weak_roots;
       
   298   ShenandoahWeakRoots<false /*concurrent*/>                 _weak_roots;
       
   299   ShenandoahStringDedupRoots                                _dedup_roots;
       
   300   ShenandoahCodeCacheRoots<ShenandoahCsetCodeRootsIterator> _code_roots;
       
   301 
       
   302 public:
       
   303   ShenandoahRootUpdater(uint n_workers, ShenandoahPhaseTimings::Phase phase);
       
   304 
       
   305   template<typename IsAlive, typename KeepAlive>
       
   306   void roots_do(uint worker_id, IsAlive* is_alive, KeepAlive* keep_alive);
       
   307 
       
   308   void strong_roots_do(uint worker_id, OopClosure* oops_cl);
       
   309 };
       
   310 
       
   311 // Adjuster all roots at a safepoint during full gc
       
   312 class ShenandoahRootAdjuster : public ShenandoahRootProcessor {
       
   313 private:
   292 private:
   314   ShenandoahSerialRoots                                     _serial_roots;
   293   ShenandoahSerialRoots                                     _serial_roots;
   315   ShenandoahVMRoots<false /*concurrent*/>                   _vm_roots;
   294   ShenandoahVMRoots<false /*concurrent*/>                   _vm_roots;
   316   ShenandoahClassLoaderDataRoots<false /*concurrent*/, false /*single threaded*/>
   295   ShenandoahClassLoaderDataRoots<false /*concurrent*/, false /*single threaded*/>
   317                                                             _cld_roots;
   296                                                             _cld_roots;
   320   ShenandoahWeakRoots<false /*concurrent*/>                 _weak_roots;
   299   ShenandoahWeakRoots<false /*concurrent*/>                 _weak_roots;
   321   ShenandoahStringDedupRoots                                _dedup_roots;
   300   ShenandoahStringDedupRoots                                _dedup_roots;
   322   ShenandoahCodeCacheRoots<ShenandoahAllCodeRootsIterator>  _code_roots;
   301   ShenandoahCodeCacheRoots<ShenandoahAllCodeRootsIterator>  _code_roots;
   323 
   302 
   324 public:
   303 public:
       
   304   ShenandoahRootUpdater(uint n_workers, ShenandoahPhaseTimings::Phase phase);
       
   305 
       
   306   template<typename IsAlive, typename KeepAlive>
       
   307   void roots_do(uint worker_id, IsAlive* is_alive, KeepAlive* keep_alive);
       
   308 
       
   309   void strong_roots_do(uint worker_id, OopClosure* oops_cl);
       
   310 };
       
   311 
       
   312 // Adjuster all roots at a safepoint during full gc
       
   313 class ShenandoahRootAdjuster : public ShenandoahRootProcessor {
       
   314 private:
       
   315   ShenandoahSerialRoots                                     _serial_roots;
       
   316   ShenandoahVMRoots<false /*concurrent*/>                   _vm_roots;
       
   317   ShenandoahClassLoaderDataRoots<false /*concurrent*/, false /*single threaded*/>
       
   318                                                             _cld_roots;
       
   319   ShenandoahThreadRoots                                     _thread_roots;
       
   320   ShenandoahSerialWeakRoots                                 _serial_weak_roots;
       
   321   ShenandoahWeakRoots<false /*concurrent*/>                 _weak_roots;
       
   322   ShenandoahStringDedupRoots                                _dedup_roots;
       
   323   ShenandoahCodeCacheRoots<ShenandoahAllCodeRootsIterator>  _code_roots;
       
   324 
       
   325 public:
   325   ShenandoahRootAdjuster(uint n_workers, ShenandoahPhaseTimings::Phase phase);
   326   ShenandoahRootAdjuster(uint n_workers, ShenandoahPhaseTimings::Phase phase);
   326 
   327 
   327   void roots_do(uint worker_id, OopClosure* oops);
   328   void roots_do(uint worker_id, OopClosure* oops);
   328 };
   329 };
   329 
   330