hotspot/src/share/vm/gc/cms/parNewGeneration.cpp
changeset 40096 246c62cd9180
parent 38198 8144ec8f789e
child 40655 9f644073d3a0
--- a/hotspot/src/share/vm/gc/cms/parNewGeneration.cpp	Fri Jul 29 08:17:43 2016 +0000
+++ b/hotspot/src/share/vm/gc/cms/parNewGeneration.cpp	Wed Jun 08 14:11:51 2016 -0700
@@ -898,7 +898,7 @@
        AdaptiveSizePolicy::calc_active_workers(workers->total_workers(),
                                                workers->active_workers(),
                                                Threads::number_of_non_daemon_threads());
-  workers->set_active_workers(active_workers);
+  active_workers = workers->update_active_workers(active_workers);
   _old_gen = gch->old_gen();
 
   // If the next generation is too full to accommodate worst-case promotion
@@ -952,7 +952,9 @@
     // separate thread causes wide variance in run times.  We can't help this
     // in the multi-threaded case, but we special-case n=1 here to get
     // repeatable measurements of the 1-thread overhead of the parallel code.
-    if (active_workers > 1) {
+    // Might multiple workers ever be used?  If yes, initialization
+    // has been done such that the single threaded path should not be used.
+    if (workers->total_workers() > 1) {
       workers->run_task(&tsk);
     } else {
       tsk.work(0);