RFR (XS): Make sure new_active_workers is used

Aleksey Shipilev ashipile at redhat.com
Tue Apr 18 12:55:29 UTC 2017


Static code analysis complains this store is not used:

  uint new_active_workers = total_workers;

This is because the line below overwrites it. I suppose we should change that line:

diff -r 1be7a284a52f src/share/vm/gc/shenandoah/shenandoahCollectorPolicy.cpp
--- a/src/share/vm/gc/shenandoah/shenandoahCollectorPolicy.cpp	Mon Apr 17
18:24:45 2017 +0200
+++ b/src/share/vm/gc/shenandoah/shenandoahCollectorPolicy.cpp	Tue Apr 18
14:53:37 2017 +0200
@@ -1016,7 +1016,7 @@
   uint max_active_workers =
     MAX2(active_workers_by_JT, active_workers_by_liveset);

-  new_active_workers = MIN2(max_active_workers, total_workers);
+  new_active_workers = MIN2(max_active_workers, new_active_workers);

   // Increase GC workers instantly but decrease them more
   // slowly.

Thanks,
-Aleksey



More information about the shenandoah-dev mailing list