< prev index next >

src/hotspot/share/compiler/compilerDefinitions.cpp

Print this page
rev 56944 : imported patch 8233702-function-to-clamp-value-to-range
rev 56946 : imported patch 8233702-kbarrett-review


 335          if (CICompilerCount < 2 && CompilationModeFlag::quick_internal()) {
 336             warning("Increasing number of compiler threads for JVMCI compiler.");
 337             FLAG_SET_ERGO(CICompilerCount, 2);
 338          }
 339       }
 340 #else // TIERED
 341       // Adjust the on stack replacement percentage to avoid early
 342       // OSR compilations while JVMCI itself is warming up
 343       if (FLAG_IS_DEFAULT(OnStackReplacePercentage)) {
 344         FLAG_SET_DEFAULT(OnStackReplacePercentage, 933);
 345       }
 346 #endif // !TIERED
 347       // JVMCI needs values not less than defaults
 348       if (FLAG_IS_DEFAULT(ReservedCodeCacheSize)) {
 349         FLAG_SET_DEFAULT(ReservedCodeCacheSize, MAX2(64*M, ReservedCodeCacheSize));
 350       }
 351       if (FLAG_IS_DEFAULT(InitialCodeCacheSize)) {
 352         FLAG_SET_DEFAULT(InitialCodeCacheSize, MAX2(16*M, InitialCodeCacheSize));
 353       }
 354       if (FLAG_IS_DEFAULT(MetaspaceSize)) {
 355         FLAG_SET_DEFAULT(MetaspaceSize, clamp(MetaspaceSize, 12*M, MaxMetaspaceSize));
 356       }
 357       if (FLAG_IS_DEFAULT(NewSizeThreadIncrease)) {
 358         FLAG_SET_DEFAULT(NewSizeThreadIncrease, MAX2(4*K, NewSizeThreadIncrease));
 359       }
 360     } // !UseJVMCINativeLibrary
 361   } // UseJVMCICompiler
 362 }
 363 #endif // INCLUDE_JVMCI
 364 
 365 bool CompilerConfig::check_args_consistency(bool status) {
 366   // Check lower bounds of the code cache
 367   // Template Interpreter code is approximately 3X larger in debug builds.
 368   uint min_code_cache_size = CodeCacheMinimumUseSpace DEBUG_ONLY(* 3);
 369   if (ReservedCodeCacheSize < InitialCodeCacheSize) {
 370     jio_fprintf(defaultStream::error_stream(),
 371                 "Invalid ReservedCodeCacheSize: %dK. Must be at least InitialCodeCacheSize=%dK.\n",
 372                 ReservedCodeCacheSize/K, InitialCodeCacheSize/K);
 373     status = false;
 374   } else if (ReservedCodeCacheSize < min_code_cache_size) {
 375     jio_fprintf(defaultStream::error_stream(),




 335          if (CICompilerCount < 2 && CompilationModeFlag::quick_internal()) {
 336             warning("Increasing number of compiler threads for JVMCI compiler.");
 337             FLAG_SET_ERGO(CICompilerCount, 2);
 338          }
 339       }
 340 #else // TIERED
 341       // Adjust the on stack replacement percentage to avoid early
 342       // OSR compilations while JVMCI itself is warming up
 343       if (FLAG_IS_DEFAULT(OnStackReplacePercentage)) {
 344         FLAG_SET_DEFAULT(OnStackReplacePercentage, 933);
 345       }
 346 #endif // !TIERED
 347       // JVMCI needs values not less than defaults
 348       if (FLAG_IS_DEFAULT(ReservedCodeCacheSize)) {
 349         FLAG_SET_DEFAULT(ReservedCodeCacheSize, MAX2(64*M, ReservedCodeCacheSize));
 350       }
 351       if (FLAG_IS_DEFAULT(InitialCodeCacheSize)) {
 352         FLAG_SET_DEFAULT(InitialCodeCacheSize, MAX2(16*M, InitialCodeCacheSize));
 353       }
 354       if (FLAG_IS_DEFAULT(MetaspaceSize)) {
 355         FLAG_SET_DEFAULT(MetaspaceSize, MIN2(MAX2(12*M, MetaspaceSize), MaxMetaspaceSize));
 356       }
 357       if (FLAG_IS_DEFAULT(NewSizeThreadIncrease)) {
 358         FLAG_SET_DEFAULT(NewSizeThreadIncrease, MAX2(4*K, NewSizeThreadIncrease));
 359       }
 360     } // !UseJVMCINativeLibrary
 361   } // UseJVMCICompiler
 362 }
 363 #endif // INCLUDE_JVMCI
 364 
 365 bool CompilerConfig::check_args_consistency(bool status) {
 366   // Check lower bounds of the code cache
 367   // Template Interpreter code is approximately 3X larger in debug builds.
 368   uint min_code_cache_size = CodeCacheMinimumUseSpace DEBUG_ONLY(* 3);
 369   if (ReservedCodeCacheSize < InitialCodeCacheSize) {
 370     jio_fprintf(defaultStream::error_stream(),
 371                 "Invalid ReservedCodeCacheSize: %dK. Must be at least InitialCodeCacheSize=%dK.\n",
 372                 ReservedCodeCacheSize/K, InitialCodeCacheSize/K);
 373     status = false;
 374   } else if (ReservedCodeCacheSize < min_code_cache_size) {
 375     jio_fprintf(defaultStream::error_stream(),


< prev index next >