changeset 13102:555f3a32bf60

Fix bad constant definition
author zgu
date Tue, 21 Mar 2017 13:29:22 -0400
parents 82450573a934
children 6aae3f3ae593
files src/share/vm/gc/shenandoah/shenandoahCollectorPolicy.cpp src/share/vm/gc/shenandoah/shenandoahCollectorPolicy.hpp src/share/vm/gc/shenandoah/shenandoah_globals.hpp
diffstat 3 files changed, 6 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/gc/shenandoah/shenandoahCollectorPolicy.cpp	Tue Mar 21 17:24:10 2017 +0100
+++ b/src/share/vm/gc/shenandoah/shenandoahCollectorPolicy.cpp	Tue Mar 21 13:29:22 2017 -0400
@@ -956,7 +956,7 @@
 
 
 uint ShenandoahCollectorPolicy::calc_workers_for_java_threads(uint application_workers) {
-  return (uint)ShenandoahGCWorkerPerJavaThread * application_workers;
+  return (uint)(ShenandoahGCWorkerPerJavaThread * application_workers);
 }
 
 uint ShenandoahCollectorPolicy::calc_workers_for_live_set(size_t live_data) {
--- a/src/share/vm/gc/shenandoah/shenandoahCollectorPolicy.hpp	Tue Mar 21 17:24:10 2017 +0100
+++ b/src/share/vm/gc/shenandoah/shenandoahCollectorPolicy.hpp	Tue Mar 21 13:29:22 2017 -0400
@@ -37,9 +37,6 @@
 class ShenandoahPhaseTimes;
 
 class ShenandoahCollectorPolicy: public CollectorPolicy {
-private:
-  static const float ShenandoahGCWorkerPerJavaThread = 0.5f;
-
 public:
   enum TimingPhase {
     total_pause_gross,
--- a/src/share/vm/gc/shenandoah/shenandoah_globals.hpp	Tue Mar 21 17:24:10 2017 +0100
+++ b/src/share/vm/gc/shenandoah/shenandoah_globals.hpp	Tue Mar 21 13:29:22 2017 -0400
@@ -120,6 +120,11 @@
           "(ignored otherwise). Defauls to 0%.")                            \
           range(0,100)                                                      \
                                                                             \
+  experimental(double, ShenandoahGCWorkerPerJavaThread, 0.5,                \
+          "Set GC worker to Java thread ratio when "                        \
+          "UseDynamicNumberOfGCThreads is enabled")                         \
+          range(0.1,10.0)                                                   \
+                                                                            \
   experimental(uintx, ShenandoahInitFreeThreshold, 10,                      \
                "Initial remaininig free threshold for adaptive heuristics") \
           range(0,100)                                                      \