8193126: Incorrect setting of MetaspaceSize and NewSizeThreadIncrease when using JVMCI compiler
authorkvn
Fri, 06 Jul 2018 13:45:41 -0700
changeset 51002 0665a966cac6
parent 51001 deff20e15445
child 51003 f8ebefc29b79
8193126: Incorrect setting of MetaspaceSize and NewSizeThreadIncrease when using JVMCI compiler Summary: select maximum default values for JVMCI Reviewed-by: dnsimon, iveresov
src/hotspot/share/compiler/compilerDefinitions.cpp
--- a/src/hotspot/share/compiler/compilerDefinitions.cpp	Fri Jul 06 10:39:38 2018 -0700
+++ b/src/hotspot/share/compiler/compilerDefinitions.cpp	Fri Jul 06 13:45:41 2018 -0700
@@ -253,17 +253,18 @@
     if (FLAG_IS_DEFAULT(OnStackReplacePercentage)) {
       FLAG_SET_DEFAULT(OnStackReplacePercentage, 933);
     }
+    // JVMCI needs values not less than defaults
     if (FLAG_IS_DEFAULT(ReservedCodeCacheSize)) {
-      FLAG_SET_DEFAULT(ReservedCodeCacheSize, 64*M);
+      FLAG_SET_DEFAULT(ReservedCodeCacheSize, MAX2(64*M, ReservedCodeCacheSize));
     }
     if (FLAG_IS_DEFAULT(InitialCodeCacheSize)) {
-      FLAG_SET_DEFAULT(InitialCodeCacheSize, 16*M);
+      FLAG_SET_DEFAULT(InitialCodeCacheSize, MAX2(16*M, InitialCodeCacheSize));
     }
     if (FLAG_IS_DEFAULT(MetaspaceSize)) {
-      FLAG_SET_DEFAULT(MetaspaceSize, 12*M);
+      FLAG_SET_DEFAULT(MetaspaceSize, MAX2(12*M, MetaspaceSize));
     }
     if (FLAG_IS_DEFAULT(NewSizeThreadIncrease)) {
-      FLAG_SET_DEFAULT(NewSizeThreadIncrease, 4*K);
+      FLAG_SET_DEFAULT(NewSizeThreadIncrease, MAX2(4*K, NewSizeThreadIncrease));
     }
     if (TieredStopAtLevel != CompLevel_full_optimization) {
       // Currently JVMCI compiler can only work at the full optimization level