src/share/vm/runtime/commandLineFlagConstraintsCompiler.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hotspot Sdiff src/share/vm/runtime

src/share/vm/runtime/commandLineFlagConstraintsCompiler.cpp

Print this page
rev 8835 : 8132525: java -client -XX:+TieredCompilation -XX:CICompilerCount=1 -version asserts since 8130858
Summary: TieredCompilation not validated when CICompilerCount is processed
Reviewed-by:


  54  * 3) The JVM is build using the compiler(s) and tiered compilation is enabled. However,
  55  *    the option "TieredStopAtLevel < CompLevel_full_optimization". As a result, only
  56  *    C1 can be used, so the minimum number of compiler threads is 1.
  57  * 4) The JVM is build using the compilers and tiered compilation is enabled. The option
  58  *    'TieredStopAtLevel = CompLevel_full_optimization' (the default value). As a result,
  59  *    the minimum number of compiler threads is 2.
  60  */
  61 Flag::Error CICompilerCountConstraintFunc(bool verbose, intx* value) {
  62   int min_number_of_compiler_threads = 0;
  63 #if !defined(COMPILER1) && !defined(COMPILER2) && !defined(SHARK)
  64   // case 1
  65 #else
  66   if (!TieredCompilation || (TieredStopAtLevel < CompLevel_full_optimization)) {
  67     min_number_of_compiler_threads = 1; // case 2 or case 3
  68   } else {
  69     min_number_of_compiler_threads = 2;   // case 4 (tiered)
  70   }
  71 #endif
  72 
  73   // The default CICompilerCount's value is CI_COMPILER_COUNT.
  74   assert(min_number_of_compiler_threads <= CI_COMPILER_COUNT, "minimum should be less or equal default number");



  75 
  76   if (*value < (intx)min_number_of_compiler_threads) {
  77     if (verbose == true) {
  78       jio_fprintf(defaultStream::error_stream(),
  79                   "CICompilerCount=" INTX_FORMAT " must be at least %d \n",
  80                   *value, min_number_of_compiler_threads);
  81     }
  82     return Flag::VIOLATES_CONSTRAINT;
  83   } else {
  84     return Flag::SUCCESS;
  85   }
  86 }


  54  * 3) The JVM is build using the compiler(s) and tiered compilation is enabled. However,
  55  *    the option "TieredStopAtLevel < CompLevel_full_optimization". As a result, only
  56  *    C1 can be used, so the minimum number of compiler threads is 1.
  57  * 4) The JVM is build using the compilers and tiered compilation is enabled. The option
  58  *    'TieredStopAtLevel = CompLevel_full_optimization' (the default value). As a result,
  59  *    the minimum number of compiler threads is 2.
  60  */
  61 Flag::Error CICompilerCountConstraintFunc(bool verbose, intx* value) {
  62   int min_number_of_compiler_threads = 0;
  63 #if !defined(COMPILER1) && !defined(COMPILER2) && !defined(SHARK)
  64   // case 1
  65 #else
  66   if (!TieredCompilation || (TieredStopAtLevel < CompLevel_full_optimization)) {
  67     min_number_of_compiler_threads = 1; // case 2 or case 3
  68   } else {
  69     min_number_of_compiler_threads = 2;   // case 4 (tiered)
  70   }
  71 #endif
  72 
  73   // The default CICompilerCount's value is CI_COMPILER_COUNT.
  74   // With a client VM, -XX:+TieredCompilation causes TieredCompilation
  75   // to be true here (the option is validated later) and
  76   // min_number_of_compiler_threads to exceed CI_COMPILER_COUNT.
  77   min_number_of_compiler_threads = MIN2(min_number_of_compiler_threads, CI_COMPILER_COUNT);
  78 
  79   if (*value < (intx)min_number_of_compiler_threads) {
  80     if (verbose == true) {
  81       jio_fprintf(defaultStream::error_stream(),
  82                   "CICompilerCount=" INTX_FORMAT " must be at least %d \n",
  83                   *value, min_number_of_compiler_threads);
  84     }
  85     return Flag::VIOLATES_CONSTRAINT;
  86   } else {
  87     return Flag::SUCCESS;
  88   }
  89 }
src/share/vm/runtime/commandLineFlagConstraintsCompiler.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File