# HG changeset patch # User kvn # Date 1530909941 25200 # Node ID 0665a966cac64adeef9e883a40e8d571ca0f9cdb # Parent deff20e154451da7aa8f96a32a50252613e49809 8193126: Incorrect setting of MetaspaceSize and NewSizeThreadIncrease when using JVMCI compiler Summary: select maximum default values for JVMCI Reviewed-by: dnsimon, iveresov diff -r deff20e15445 -r 0665a966cac6 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