< prev index next >

src/hotspot/share/gc/shenandoah/shenandoahWorkerPolicy.cpp

Print this page
*** 30,10 ***
--- 30,11 ---
  #include "runtime/javaThread.hpp"
  #include "runtime/threads.hpp"
  
  uint ShenandoahWorkerPolicy::_prev_par_marking     = 0;
  uint ShenandoahWorkerPolicy::_prev_conc_marking    = 0;
+ uint ShenandoahWorkerPolicy::_prev_conc_rs_scanning = 0;
  uint ShenandoahWorkerPolicy::_prev_conc_evac       = 0;
  uint ShenandoahWorkerPolicy::_prev_conc_root_proc  = 0;
  uint ShenandoahWorkerPolicy::_prev_conc_refs_proc  = 0;
  uint ShenandoahWorkerPolicy::_prev_fullgc          = 0;
  uint ShenandoahWorkerPolicy::_prev_degengc         = 0;

*** 59,10 ***
--- 60,19 ---
                                             active_workers,
                                             Threads::number_of_non_daemon_threads());
    return _prev_conc_marking;
  }
  
+ uint ShenandoahWorkerPolicy::calc_workers_for_rs_scanning() {
+   uint active_workers = (_prev_conc_rs_scanning == 0) ? ConcGCThreads : _prev_conc_rs_scanning;
+   _prev_conc_rs_scanning =
+     WorkerPolicy::calc_active_conc_workers(ConcGCThreads,
+                                            active_workers,
+                                            Threads::number_of_non_daemon_threads());
+   return _prev_conc_rs_scanning;
+ }
+ 
  // Reuse the calculation result from init marking
  uint ShenandoahWorkerPolicy::calc_workers_for_final_marking() {
    return _prev_par_marking;
  }
  
< prev index next >