< prev index next >

src/hotspot/share/compiler/compilerDefinitions.cpp

Print this page
rev 53533 : [mq]: 8217848


 131   }
 132   if (FLAG_IS_DEFAULT(InitialCodeCacheSize)) {
 133     FLAG_SET_ERGO(uintx, InitialCodeCacheSize, 160*K);
 134   }
 135   if (FLAG_IS_DEFAULT(ReservedCodeCacheSize)) {
 136     FLAG_SET_ERGO(uintx, ReservedCodeCacheSize, 32*M);
 137   }
 138   if (FLAG_IS_DEFAULT(NonProfiledCodeHeapSize)) {
 139     FLAG_SET_ERGO(uintx, NonProfiledCodeHeapSize, 27*M);
 140   }
 141   if (FLAG_IS_DEFAULT(ProfiledCodeHeapSize)) {
 142     FLAG_SET_ERGO(uintx, ProfiledCodeHeapSize, 0);
 143   }
 144   if (FLAG_IS_DEFAULT(NonNMethodCodeHeapSize)) {
 145     FLAG_SET_ERGO(uintx, NonNMethodCodeHeapSize, 5*M);
 146   }
 147   if (FLAG_IS_DEFAULT(CodeCacheExpansionSize)) {
 148     FLAG_SET_ERGO(uintx, CodeCacheExpansionSize, 32*K);
 149   }
 150   if (FLAG_IS_DEFAULT(MetaspaceSize)) {
 151     FLAG_SET_ERGO(size_t, MetaspaceSize, 12*M);
 152   }
 153   if (FLAG_IS_DEFAULT(MaxRAM)) {
 154     // Do not use FLAG_SET_ERGO to update MaxRAM, as this will impact
 155     // heap setting done based on available phys_mem (see Arguments::set_heap_size).
 156     FLAG_SET_DEFAULT(MaxRAM, 1ULL*G);
 157   }
 158   if (FLAG_IS_DEFAULT(CompileThreshold)) {
 159     FLAG_SET_ERGO(intx, CompileThreshold, 1500);
 160   }
 161   if (FLAG_IS_DEFAULT(OnStackReplacePercentage)) {
 162     FLAG_SET_ERGO(intx, OnStackReplacePercentage, 933);
 163   }
 164   if (FLAG_IS_DEFAULT(CICompilerCount)) {
 165     FLAG_SET_ERGO(intx, CICompilerCount, 1);
 166   }
 167 }
 168 
 169 bool compilation_mode_selected() {
 170   return !FLAG_IS_DEFAULT(TieredCompilation) ||
 171          !FLAG_IS_DEFAULT(TieredStopAtLevel) ||


 247 
 248 #if INCLUDE_JVMCI
 249 void set_jvmci_specific_flags() {
 250   if (UseJVMCICompiler) {
 251     Compilation_mode = CompMode_server;
 252 
 253     if (FLAG_IS_DEFAULT(TypeProfileWidth)) {
 254       FLAG_SET_DEFAULT(TypeProfileWidth, 8);
 255     }
 256     if (FLAG_IS_DEFAULT(OnStackReplacePercentage)) {
 257       FLAG_SET_DEFAULT(OnStackReplacePercentage, 933);
 258     }
 259     // JVMCI needs values not less than defaults
 260     if (FLAG_IS_DEFAULT(ReservedCodeCacheSize)) {
 261       FLAG_SET_DEFAULT(ReservedCodeCacheSize, MAX2(64*M, ReservedCodeCacheSize));
 262     }
 263     if (FLAG_IS_DEFAULT(InitialCodeCacheSize)) {
 264       FLAG_SET_DEFAULT(InitialCodeCacheSize, MAX2(16*M, InitialCodeCacheSize));
 265     }
 266     if (FLAG_IS_DEFAULT(MetaspaceSize)) {
 267       FLAG_SET_DEFAULT(MetaspaceSize, MAX2(12*M, MetaspaceSize));
 268     }
 269     if (FLAG_IS_DEFAULT(NewSizeThreadIncrease)) {
 270       FLAG_SET_DEFAULT(NewSizeThreadIncrease, MAX2(4*K, NewSizeThreadIncrease));
 271     }
 272     if (TieredStopAtLevel != CompLevel_full_optimization) {
 273       // Currently JVMCI compiler can only work at the full optimization level
 274       warning("forcing TieredStopAtLevel to full optimization because JVMCI is enabled");
 275       FLAG_SET_ERGO(intx, TieredStopAtLevel, CompLevel_full_optimization);
 276     }
 277     if (FLAG_IS_DEFAULT(TypeProfileLevel)) {
 278       FLAG_SET_DEFAULT(TypeProfileLevel, 0);
 279     }
 280   }
 281 }
 282 #endif // INCLUDE_JVMCI
 283 
 284 bool CompilerConfig::check_args_consistency(bool status) {
 285   // Check lower bounds of the code cache
 286   // Template Interpreter code is approximately 3X larger in debug builds.
 287   uint min_code_cache_size = CodeCacheMinimumUseSpace DEBUG_ONLY(* 3);




 131   }
 132   if (FLAG_IS_DEFAULT(InitialCodeCacheSize)) {
 133     FLAG_SET_ERGO(uintx, InitialCodeCacheSize, 160*K);
 134   }
 135   if (FLAG_IS_DEFAULT(ReservedCodeCacheSize)) {
 136     FLAG_SET_ERGO(uintx, ReservedCodeCacheSize, 32*M);
 137   }
 138   if (FLAG_IS_DEFAULT(NonProfiledCodeHeapSize)) {
 139     FLAG_SET_ERGO(uintx, NonProfiledCodeHeapSize, 27*M);
 140   }
 141   if (FLAG_IS_DEFAULT(ProfiledCodeHeapSize)) {
 142     FLAG_SET_ERGO(uintx, ProfiledCodeHeapSize, 0);
 143   }
 144   if (FLAG_IS_DEFAULT(NonNMethodCodeHeapSize)) {
 145     FLAG_SET_ERGO(uintx, NonNMethodCodeHeapSize, 5*M);
 146   }
 147   if (FLAG_IS_DEFAULT(CodeCacheExpansionSize)) {
 148     FLAG_SET_ERGO(uintx, CodeCacheExpansionSize, 32*K);
 149   }
 150   if (FLAG_IS_DEFAULT(MetaspaceSize)) {
 151     FLAG_SET_ERGO(size_t, MetaspaceSize, MIN2(12*M, MaxMetaspaceSize));
 152   }
 153   if (FLAG_IS_DEFAULT(MaxRAM)) {
 154     // Do not use FLAG_SET_ERGO to update MaxRAM, as this will impact
 155     // heap setting done based on available phys_mem (see Arguments::set_heap_size).
 156     FLAG_SET_DEFAULT(MaxRAM, 1ULL*G);
 157   }
 158   if (FLAG_IS_DEFAULT(CompileThreshold)) {
 159     FLAG_SET_ERGO(intx, CompileThreshold, 1500);
 160   }
 161   if (FLAG_IS_DEFAULT(OnStackReplacePercentage)) {
 162     FLAG_SET_ERGO(intx, OnStackReplacePercentage, 933);
 163   }
 164   if (FLAG_IS_DEFAULT(CICompilerCount)) {
 165     FLAG_SET_ERGO(intx, CICompilerCount, 1);
 166   }
 167 }
 168 
 169 bool compilation_mode_selected() {
 170   return !FLAG_IS_DEFAULT(TieredCompilation) ||
 171          !FLAG_IS_DEFAULT(TieredStopAtLevel) ||


 247 
 248 #if INCLUDE_JVMCI
 249 void set_jvmci_specific_flags() {
 250   if (UseJVMCICompiler) {
 251     Compilation_mode = CompMode_server;
 252 
 253     if (FLAG_IS_DEFAULT(TypeProfileWidth)) {
 254       FLAG_SET_DEFAULT(TypeProfileWidth, 8);
 255     }
 256     if (FLAG_IS_DEFAULT(OnStackReplacePercentage)) {
 257       FLAG_SET_DEFAULT(OnStackReplacePercentage, 933);
 258     }
 259     // JVMCI needs values not less than defaults
 260     if (FLAG_IS_DEFAULT(ReservedCodeCacheSize)) {
 261       FLAG_SET_DEFAULT(ReservedCodeCacheSize, MAX2(64*M, ReservedCodeCacheSize));
 262     }
 263     if (FLAG_IS_DEFAULT(InitialCodeCacheSize)) {
 264       FLAG_SET_DEFAULT(InitialCodeCacheSize, MAX2(16*M, InitialCodeCacheSize));
 265     }
 266     if (FLAG_IS_DEFAULT(MetaspaceSize)) {
 267       FLAG_SET_DEFAULT(MetaspaceSize, MIN2(MAX2(12*M, MetaspaceSize), MaxMetaspaceSize));
 268     }
 269     if (FLAG_IS_DEFAULT(NewSizeThreadIncrease)) {
 270       FLAG_SET_DEFAULT(NewSizeThreadIncrease, MAX2(4*K, NewSizeThreadIncrease));
 271     }
 272     if (TieredStopAtLevel != CompLevel_full_optimization) {
 273       // Currently JVMCI compiler can only work at the full optimization level
 274       warning("forcing TieredStopAtLevel to full optimization because JVMCI is enabled");
 275       FLAG_SET_ERGO(intx, TieredStopAtLevel, CompLevel_full_optimization);
 276     }
 277     if (FLAG_IS_DEFAULT(TypeProfileLevel)) {
 278       FLAG_SET_DEFAULT(TypeProfileLevel, 0);
 279     }
 280   }
 281 }
 282 #endif // INCLUDE_JVMCI
 283 
 284 bool CompilerConfig::check_args_consistency(bool status) {
 285   // Check lower bounds of the code cache
 286   // Template Interpreter code is approximately 3X larger in debug builds.
 287   uint min_code_cache_size = CodeCacheMinimumUseSpace DEBUG_ONLY(* 3);


< prev index next >