< prev index next >

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

Print this page
rev 59534 : 8245961: Shenandoah: move some root marking to concurrent phase


 233 
 234   void always_strong_cld_do(CLDClosure* clds, uint worker_id);
 235   void cld_do(CLDClosure* clds, uint worker_id);
 236 };
 237 
 238 class ShenandoahRootProcessor : public StackObj {
 239 private:
 240   ShenandoahHeap* const               _heap;
 241   const ShenandoahPhaseTimings::Phase _phase;
 242   const ShenandoahGCWorkerPhase       _worker_phase;
 243 public:
 244   ShenandoahRootProcessor(ShenandoahPhaseTimings::Phase phase);
 245 
 246   ShenandoahHeap* heap() const { return _heap; }
 247 };
 248 
 249 class ShenandoahRootScanner : public ShenandoahRootProcessor {
 250 private:
 251   ShenandoahSerialRoots                                     _serial_roots;
 252   ShenandoahThreadRoots                                     _thread_roots;
 253   ShenandoahCodeCacheRoots                                  _code_roots;
 254   ShenandoahVMRoots<false /*concurrent*/ >                  _vm_roots;
 255   ShenandoahStringDedupRoots                                _dedup_roots;
 256   ShenandoahClassLoaderDataRoots<false /*concurrent*/, false /*single threaded*/>
 257                                                             _cld_roots;
 258 public:
 259   ShenandoahRootScanner(uint n_workers, ShenandoahPhaseTimings::Phase phase);

 260 
 261   // Apply oops, clds and blobs to all strongly reachable roots in the system,
 262   // during class unloading cycle
 263   void strong_roots_do(uint worker_id, OopClosure* cl);
 264   void strong_roots_do(uint worker_id, OopClosure* oops, CLDClosure* clds, CodeBlobClosure* code, ThreadClosure* tc = NULL);
 265 
 266   // Apply oops, clds and blobs to all strongly reachable roots and weakly reachable
 267   // roots when class unloading is disabled during this cycle
 268   void roots_do(uint worker_id, OopClosure* cl);
 269   void roots_do(uint worker_id, OopClosure* oops, CLDClosure* clds, CodeBlobClosure* code, ThreadClosure* tc = NULL);
 270 };
 271 
 272 // This scanner is only for SH::object_iteration() and only supports single-threaded
 273 // root scanning
 274 class ShenandoahHeapIterationRootScanner : public ShenandoahRootProcessor {
 275 private:
 276   ShenandoahSerialRoots                                    _serial_roots;
 277   ShenandoahThreadRoots                                    _thread_roots;
 278   ShenandoahVMRoots<false /*concurrent*/>                  _vm_roots;
 279   ShenandoahClassLoaderDataRoots<false /*concurrent*/, true /*single threaded*/>




 233 
 234   void always_strong_cld_do(CLDClosure* clds, uint worker_id);
 235   void cld_do(CLDClosure* clds, uint worker_id);
 236 };
 237 
 238 class ShenandoahRootProcessor : public StackObj {
 239 private:
 240   ShenandoahHeap* const               _heap;
 241   const ShenandoahPhaseTimings::Phase _phase;
 242   const ShenandoahGCWorkerPhase       _worker_phase;
 243 public:
 244   ShenandoahRootProcessor(ShenandoahPhaseTimings::Phase phase);
 245 
 246   ShenandoahHeap* heap() const { return _heap; }
 247 };
 248 
 249 class ShenandoahRootScanner : public ShenandoahRootProcessor {
 250 private:
 251   ShenandoahSerialRoots                                     _serial_roots;
 252   ShenandoahThreadRoots                                     _thread_roots;


 253   ShenandoahStringDedupRoots                                _dedup_roots;
 254 

 255 public:
 256   ShenandoahRootScanner(uint n_workers, ShenandoahPhaseTimings::Phase phase);
 257   ~ShenandoahRootScanner();
 258 
 259   // Apply oops, clds and blobs to all strongly reachable roots in the system,
 260   // during class unloading cycle
 261   void strong_roots_do(uint worker_id, OopClosure* cl);
 262   void strong_roots_do(uint worker_id, OopClosure* oops, CLDClosure* clds, CodeBlobClosure* code, ThreadClosure* tc = NULL);
 263 
 264   // Apply oops, clds and blobs to all strongly reachable roots and weakly reachable
 265   // roots when class unloading is disabled during this cycle
 266   void roots_do(uint worker_id, OopClosure* cl);
 267   void roots_do(uint worker_id, OopClosure* oops, CLDClosure* clds, CodeBlobClosure* code, ThreadClosure* tc = NULL);
 268 };
 269 
 270 // This scanner is only for SH::object_iteration() and only supports single-threaded
 271 // root scanning
 272 class ShenandoahHeapIterationRootScanner : public ShenandoahRootProcessor {
 273 private:
 274   ShenandoahSerialRoots                                    _serial_roots;
 275   ShenandoahThreadRoots                                    _thread_roots;
 276   ShenandoahVMRoots<false /*concurrent*/>                  _vm_roots;
 277   ShenandoahClassLoaderDataRoots<false /*concurrent*/, true /*single threaded*/>


< prev index next >