src/hotspot/share/runtime/flags/jvmFlagConstraintsCompiler.cpp
changeset 58894 b95bead30957
parent 53002 9d60798b21af
child 58926 ecb801342b8c
equal deleted inserted replaced
58893:ec954ef6caf1 58894:b95bead30957
    58  *    the option "TieredStopAtLevel < CompLevel_full_optimization". As a result, only
    58  *    the option "TieredStopAtLevel < CompLevel_full_optimization". As a result, only
    59  *    C1 can be used, so the minimum number of compiler threads is 1.
    59  *    C1 can be used, so the minimum number of compiler threads is 1.
    60  * 4) The JVM is build using the compilers and tiered compilation is enabled. The option
    60  * 4) The JVM is build using the compilers and tiered compilation is enabled. The option
    61  *    'TieredStopAtLevel = CompLevel_full_optimization' (the default value). As a result,
    61  *    'TieredStopAtLevel = CompLevel_full_optimization' (the default value). As a result,
    62  *    the minimum number of compiler threads is 2.
    62  *    the minimum number of compiler threads is 2.
       
    63  * 5) Non-tiered emulation mode is on. CompilationModeFlag::disable_intermediate() == true.
       
    64  *    The mininum number of threads is 2. But if CompilationModeFlag::quick_internal() == false, then it's 1.
    63  */
    65  */
    64 JVMFlag::Error CICompilerCountConstraintFunc(intx value, bool verbose) {
    66 JVMFlag::Error CICompilerCountConstraintFunc(intx value, bool verbose) {
    65   int min_number_of_compiler_threads = 0;
    67   int min_number_of_compiler_threads = 0;
    66 #if !defined(COMPILER1) && !defined(COMPILER2) && !INCLUDE_JVMCI
    68 #if !defined(COMPILER1) && !defined(COMPILER2) && !INCLUDE_JVMCI
    67   // case 1
    69   // case 1
    68 #else
    70 #else
    69   if (!TieredCompilation || (TieredStopAtLevel < CompLevel_full_optimization)) {
    71   if (TieredCompilation) {
    70     min_number_of_compiler_threads = 1; // case 2 or case 3
    72     if (TieredStopAtLevel < CompLevel_full_optimization || CompilationModeFlag::quick_only()) {
       
    73       min_number_of_compiler_threads = 1; // case 3
       
    74     } else if (CompilationModeFlag::disable_intermediate()) {
       
    75       // case 5
       
    76       if (CompilationModeFlag::quick_internal()) {
       
    77         min_number_of_compiler_threads = 2;
       
    78       } else {
       
    79         min_number_of_compiler_threads = 1;
       
    80       }
       
    81     } else {
       
    82       min_number_of_compiler_threads = 2;   // case 4 (tiered)
       
    83     }
    71   } else {
    84   } else {
    72     min_number_of_compiler_threads = 2;   // case 4 (tiered)
    85     min_number_of_compiler_threads = 1; // case 2
    73   }
    86   }
    74 #endif
    87 #endif
    75 
    88 
    76   // The default CICompilerCount's value is CI_COMPILER_COUNT.
    89   // The default CICompilerCount's value is CI_COMPILER_COUNT.
    77   // With a client VM, -XX:+TieredCompilation causes TieredCompilation
    90   // With a client VM, -XX:+TieredCompilation causes TieredCompilation