< prev index next >

src/hotspot/share/runtime/commandLineFlagConstraintsCompiler.cpp

Print this page
rev 47445 : 8171853: Remove Shark compiler


  47   }
  48 }
  49 
  50 /**
  51  * Validate the minimum number of compiler threads needed to run the
  52  * JVM. The following configurations are possible.
  53  *
  54  * 1) The JVM is build using an interpreter only. As a result, the minimum number of
  55  *    compiler threads is 0.
  56  * 2) The JVM is build using the compiler(s) and tiered compilation is disabled. As
  57  *    a result, either C1 or C2 is used, so the minimum number of compiler threads is 1.
  58  * 3) The JVM is build using the compiler(s) and tiered compilation is enabled. However,
  59  *    the option "TieredStopAtLevel < CompLevel_full_optimization". As a result, only
  60  *    C1 can be used, so the minimum number of compiler threads is 1.
  61  * 4) The JVM is build using the compilers and tiered compilation is enabled. The option
  62  *    'TieredStopAtLevel = CompLevel_full_optimization' (the default value). As a result,
  63  *    the minimum number of compiler threads is 2.
  64  */
  65 Flag::Error CICompilerCountConstraintFunc(intx value, bool verbose) {
  66   int min_number_of_compiler_threads = 0;
  67 #if !defined(COMPILER1) && !defined(COMPILER2) && !defined(SHARK) && !INCLUDE_JVMCI
  68   // case 1
  69 #else
  70   if (!TieredCompilation || (TieredStopAtLevel < CompLevel_full_optimization)) {
  71     min_number_of_compiler_threads = 1; // case 2 or case 3
  72   } else {
  73     min_number_of_compiler_threads = 2;   // case 4 (tiered)
  74   }
  75 #endif
  76 
  77   // The default CICompilerCount's value is CI_COMPILER_COUNT.
  78   // With a client VM, -XX:+TieredCompilation causes TieredCompilation
  79   // to be true here (the option is validated later) and
  80   // min_number_of_compiler_threads to exceed CI_COMPILER_COUNT.
  81   min_number_of_compiler_threads = MIN2(min_number_of_compiler_threads, CI_COMPILER_COUNT);
  82 
  83   if (value < (intx)min_number_of_compiler_threads) {
  84     CommandLineError::print(verbose,
  85                             "CICompilerCount (" INTX_FORMAT ") must be "
  86                             "at least %d \n",
  87                             value, min_number_of_compiler_threads);




  47   }
  48 }
  49 
  50 /**
  51  * Validate the minimum number of compiler threads needed to run the
  52  * JVM. The following configurations are possible.
  53  *
  54  * 1) The JVM is build using an interpreter only. As a result, the minimum number of
  55  *    compiler threads is 0.
  56  * 2) The JVM is build using the compiler(s) and tiered compilation is disabled. As
  57  *    a result, either C1 or C2 is used, so the minimum number of compiler threads is 1.
  58  * 3) The JVM is build using the compiler(s) and tiered compilation is enabled. However,
  59  *    the option "TieredStopAtLevel < CompLevel_full_optimization". As a result, only
  60  *    C1 can be used, so the minimum number of compiler threads is 1.
  61  * 4) The JVM is build using the compilers and tiered compilation is enabled. The option
  62  *    'TieredStopAtLevel = CompLevel_full_optimization' (the default value). As a result,
  63  *    the minimum number of compiler threads is 2.
  64  */
  65 Flag::Error CICompilerCountConstraintFunc(intx value, bool verbose) {
  66   int min_number_of_compiler_threads = 0;
  67 #if !defined(COMPILER1) && !defined(COMPILER2) && !INCLUDE_JVMCI
  68   // case 1
  69 #else
  70   if (!TieredCompilation || (TieredStopAtLevel < CompLevel_full_optimization)) {
  71     min_number_of_compiler_threads = 1; // case 2 or case 3
  72   } else {
  73     min_number_of_compiler_threads = 2;   // case 4 (tiered)
  74   }
  75 #endif
  76 
  77   // The default CICompilerCount's value is CI_COMPILER_COUNT.
  78   // With a client VM, -XX:+TieredCompilation causes TieredCompilation
  79   // to be true here (the option is validated later) and
  80   // min_number_of_compiler_threads to exceed CI_COMPILER_COUNT.
  81   min_number_of_compiler_threads = MIN2(min_number_of_compiler_threads, CI_COMPILER_COUNT);
  82 
  83   if (value < (intx)min_number_of_compiler_threads) {
  84     CommandLineError::print(verbose,
  85                             "CICompilerCount (" INTX_FORMAT ") must be "
  86                             "at least %d \n",
  87                             value, min_number_of_compiler_threads);


< prev index next >