src/hotspot/share/compiler/compilerDefinitions.cpp
changeset 54669 ad45b3802d4e
parent 53592 8da08ded586f
child 54983 81becad91321
equal deleted inserted replaced
54668:0bda2308eded 54669:ad45b3802d4e
   251     Compilation_mode = CompMode_server;
   251     Compilation_mode = CompMode_server;
   252 
   252 
   253     if (FLAG_IS_DEFAULT(TypeProfileWidth)) {
   253     if (FLAG_IS_DEFAULT(TypeProfileWidth)) {
   254       FLAG_SET_DEFAULT(TypeProfileWidth, 8);
   254       FLAG_SET_DEFAULT(TypeProfileWidth, 8);
   255     }
   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) {
   256     if (TieredStopAtLevel != CompLevel_full_optimization) {
   273       // Currently JVMCI compiler can only work at the full optimization level
   257       // Currently JVMCI compiler can only work at the full optimization level
   274       warning("forcing TieredStopAtLevel to full optimization because JVMCI is enabled");
   258       warning("forcing TieredStopAtLevel to full optimization because JVMCI is enabled");
   275       FLAG_SET_ERGO(intx, TieredStopAtLevel, CompLevel_full_optimization);
   259       FLAG_SET_ERGO(intx, TieredStopAtLevel, CompLevel_full_optimization);
   276     }
   260     }
   277     if (FLAG_IS_DEFAULT(TypeProfileLevel)) {
   261     if (FLAG_IS_DEFAULT(TypeProfileLevel)) {
   278       FLAG_SET_DEFAULT(TypeProfileLevel, 0);
   262       FLAG_SET_DEFAULT(TypeProfileLevel, 0);
   279     }
   263     }
   280   }
   264 
       
   265     if (UseJVMCINativeLibrary) {
       
   266       // SVM compiled code requires more stack space
       
   267       if (FLAG_IS_DEFAULT(CompilerThreadStackSize)) {
       
   268         // Duplicate logic in the implementations of os::create_thread
       
   269         // so that we can then double the computed stack size. Once
       
   270         // the stack size requirements of SVM are better understood,
       
   271         // this logic can be pushed down into os::create_thread.
       
   272         int stack_size = CompilerThreadStackSize;
       
   273         if (stack_size == 0) {
       
   274           stack_size = VMThreadStackSize;
       
   275         }
       
   276         if (stack_size != 0) {
       
   277           FLAG_SET_DEFAULT(CompilerThreadStackSize, stack_size * 2);
       
   278         }
       
   279       }
       
   280     } else {
       
   281       // Adjust the on stack replacement percentage to avoid early
       
   282       // OSR compilations while JVMCI itself is warming up
       
   283       if (FLAG_IS_DEFAULT(OnStackReplacePercentage)) {
       
   284         FLAG_SET_DEFAULT(OnStackReplacePercentage, 933);
       
   285       }
       
   286       // JVMCI needs values not less than defaults
       
   287       if (FLAG_IS_DEFAULT(ReservedCodeCacheSize)) {
       
   288         FLAG_SET_DEFAULT(ReservedCodeCacheSize, MAX2(64*M, ReservedCodeCacheSize));
       
   289       }
       
   290       if (FLAG_IS_DEFAULT(InitialCodeCacheSize)) {
       
   291         FLAG_SET_DEFAULT(InitialCodeCacheSize, MAX2(16*M, InitialCodeCacheSize));
       
   292       }
       
   293       if (FLAG_IS_DEFAULT(MetaspaceSize)) {
       
   294         FLAG_SET_DEFAULT(MetaspaceSize, MIN2(MAX2(12*M, MetaspaceSize), MaxMetaspaceSize));
       
   295       }
       
   296       if (FLAG_IS_DEFAULT(NewSizeThreadIncrease)) {
       
   297         FLAG_SET_DEFAULT(NewSizeThreadIncrease, MAX2(4*K, NewSizeThreadIncrease));
       
   298       }
       
   299     } // !UseJVMCINativeLibrary
       
   300   } // UseJVMCICompiler
   281 }
   301 }
   282 #endif // INCLUDE_JVMCI
   302 #endif // INCLUDE_JVMCI
   283 
   303 
   284 bool CompilerConfig::check_args_consistency(bool status) {
   304 bool CompilerConfig::check_args_consistency(bool status) {
   285   // Check lower bounds of the code cache
   305   // Check lower bounds of the code cache
   390 
   410 
   391 #if INCLUDE_JVMCI
   411 #if INCLUDE_JVMCI
   392   // Check that JVMCI compiler supports selested GC.
   412   // Check that JVMCI compiler supports selested GC.
   393   // Should be done after GCConfig::initialize() was called.
   413   // Should be done after GCConfig::initialize() was called.
   394   JVMCIGlobals::check_jvmci_supported_gc();
   414   JVMCIGlobals::check_jvmci_supported_gc();
       
   415 
       
   416   // Do JVMCI specific settings
   395   set_jvmci_specific_flags();
   417   set_jvmci_specific_flags();
   396 #endif
   418 #endif
   397 
   419 
   398   if (TieredCompilation) {
   420   if (TieredCompilation) {
   399     set_tiered_flags();
   421     set_tiered_flags();