changeset 51002:0665a966cac6

8193126: Incorrect setting of MetaspaceSize and NewSizeThreadIncrease when using JVMCI compiler Summary: select maximum default values for JVMCI Reviewed-by: dnsimon, iveresov
author kvn
date Fri, 06 Jul 2018 13:45:41 -0700
parents deff20e15445
children f8ebefc29b79
files src/hotspot/share/compiler/compilerDefinitions.cpp
diffstat 1 files changed, 5 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- 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