src/hotspot/share/gc/shenandoah/shenandoahRootProcessor.hpp
changeset 54338 7a34a3270270
parent 54103 8b61a38be0c5
child 54344 8cd2af66ac7c
equal deleted inserted replaced
54337:5a9d780eb9dd 54338:7a34a3270270
    71                           CodeBlobClosure* scan_strong_code,
    71                           CodeBlobClosure* scan_strong_code,
    72                           ThreadClosure* thread_cl,
    72                           ThreadClosure* thread_cl,
    73                           uint worker_i);
    73                           uint worker_i);
    74 
    74 
    75   void process_vm_roots(OopClosure* scan_non_heap_roots,
    75   void process_vm_roots(OopClosure* scan_non_heap_roots,
    76                         OopClosure* scan_non_heap_weak_roots,
       
    77                         OopClosure* weak_jni_roots,
       
    78                         uint worker_i);
    76                         uint worker_i);
    79 
    77 
    80   void weak_processor_timing_to_shenandoah_timing(const WeakProcessorPhases::Phase wpp,
    78   void weak_processor_timing_to_shenandoah_timing(const WeakProcessorPhases::Phase wpp,
    81                                                   const ShenandoahPhaseTimings::GCParPhases spp,
    79                                                   const ShenandoahPhaseTimings::GCParPhases spp,
    82                                                   ShenandoahWorkerTimings* worker_times) const;
    80                                                   ShenandoahWorkerTimings* worker_times) const;
    84 public:
    82 public:
    85   ShenandoahRootProcessor(ShenandoahHeap* heap, uint n_workers,
    83   ShenandoahRootProcessor(ShenandoahHeap* heap, uint n_workers,
    86                           ShenandoahPhaseTimings::Phase phase);
    84                           ShenandoahPhaseTimings::Phase phase);
    87   ~ShenandoahRootProcessor();
    85   ~ShenandoahRootProcessor();
    88 
    86 
    89   // Apply oops, clds and blobs to all strongly reachable roots in the system
    87   // Apply oops, clds and blobs to all strongly reachable roots in the system.
    90   void process_strong_roots(OopClosure* oops, OopClosure* weak_oops,
    88   // Optionally, apply class loader closure to weak clds, depending on class unloading
       
    89   // for the particular GC cycles.
       
    90   void process_strong_roots(OopClosure* oops,
    91                             CLDClosure* clds,
    91                             CLDClosure* clds,
    92                             CLDClosure* weak_clds,
    92                             CLDClosure* weak_clds,
    93                             CodeBlobClosure* blobs,
    93                             CodeBlobClosure* blobs,
    94                             ThreadClosure* thread_cl,
    94                             ThreadClosure* thread_cl,
    95                             uint worker_id);
    95                             uint worker_id);
    96 
    96 
    97   // Apply oops, clds and blobs to strongly and weakly reachable roots in the system
    97   // Apply oops, clds and blobs to strongly reachable roots in the system
    98   void process_all_roots(OopClosure* oops, OopClosure* weak_oops,
    98   void process_all_roots(OopClosure* oops,
    99                          CLDClosure* clds,
    99                          CLDClosure* clds,
   100                          CodeBlobClosure* blobs,
   100                          CodeBlobClosure* blobs,
   101                          ThreadClosure* thread_cl,
   101                          ThreadClosure* thread_cl,
   102                          uint worker_id);
   102                          uint worker_id);
       
   103 
       
   104   // Apply oops, clds and blobs to strongly and weakly reachable roots in the system
       
   105   void update_all_roots(OopClosure* oops,
       
   106                         CLDClosure* clds,
       
   107                         CodeBlobClosure* blobs,
       
   108                         ThreadClosure* thread_cl,
       
   109                         uint worker_id);
       
   110 
       
   111 
       
   112   // Apply oops, clds and blobs to strongly and weakly reachable roots in the system
       
   113   // during traversal GC.
       
   114   // It cleans up and updates weak roots in one iteration.
       
   115   void traversal_update_all_roots(OopClosure* oops,
       
   116                                   CLDClosure* clds,
       
   117                                   CodeBlobClosure* blobs,
       
   118                                   ThreadClosure* thread_cl,
       
   119                                   uint worker_id);
   103 
   120 
   104   // For slow debug/verification code
   121   // For slow debug/verification code
   105   void process_all_roots_slow(OopClosure* oops);
   122   void process_all_roots_slow(OopClosure* oops);
   106 
   123 
   107   // Number of worker threads used by the root processor.
   124   // Number of worker threads used by the root processor.