src/share/vm/runtime/arguments.cpp

changeset 7311
327c00d0f091
parent 7310
4356234e712a
child 7315
86307d477907
equal deleted inserted replaced
7310:4356234e712a 7311:327c00d0f091
1143 Tier3InvokeNotifyFreqLog = 0; 1143 Tier3InvokeNotifyFreqLog = 0;
1144 Tier4InvocationThreshold = 0; 1144 Tier4InvocationThreshold = 0;
1145 } 1145 }
1146 } 1146 }
1147 1147
1148 /**
1149 * Returns the minimum number of compiler threads needed to run the JVM. The following
1150 * configurations are possible.
1151 *
1152 * 1) The JVM is build using an interpreter only. As a result, the minimum number of
1153 * compiler threads is 0.
1154 * 2) The JVM is build using the compiler(s) and tiered compilation is disabled. As
1155 * a result, either C1 or C2 is used, so the minimum number of compiler threads is 1.
1156 * 3) The JVM is build using the compiler(s) and tiered compilation is enabled. However,
1157 * the option "TieredStopAtLevel < CompLevel_full_optimization". As a result, only
1158 * C1 can be used, so the minimum number of compiler threads is 1.
1159 * 4) The JVM is build using the compilers and tiered compilation is enabled. The option
1160 * 'TieredStopAtLevel = CompLevel_full_optimization' (the default value). As a result,
1161 * the minimum number of compiler threads is 2.
1162 */
1163 int Arguments::get_min_number_of_compiler_threads() {
1164 #if !defined(COMPILER1) && !defined(COMPILER2) && !defined(SHARK)
1165 return 0; // case 1
1166 #else
1167 if (!TieredCompilation || (TieredStopAtLevel < CompLevel_full_optimization)) {
1168 return 1; // case 2 or case 3
1169 }
1170 return 2; // case 4 (tiered)
1171 #endif
1172 }
1173
1148 #if INCLUDE_ALL_GCS 1174 #if INCLUDE_ALL_GCS
1149 static void disable_adaptive_size_policy(const char* collector_name) { 1175 static void disable_adaptive_size_policy(const char* collector_name) {
1150 if (UseAdaptiveSizePolicy) { 1176 if (UseAdaptiveSizePolicy) {
1151 if (FLAG_IS_CMDLINE(UseAdaptiveSizePolicy)) { 1177 if (FLAG_IS_CMDLINE(UseAdaptiveSizePolicy)) {
1152 warning("disabling UseAdaptiveSizePolicy; it is incompatible with %s.", 1178 warning("disabling UseAdaptiveSizePolicy; it is incompatible with %s.",
2460 2486
2461 #ifdef COMPILER1 2487 #ifdef COMPILER1
2462 status &= verify_interval(SafepointPollOffset, 0, os::vm_page_size() - BytesPerWord, "SafepointPollOffset"); 2488 status &= verify_interval(SafepointPollOffset, 0, os::vm_page_size() - BytesPerWord, "SafepointPollOffset");
2463 #endif 2489 #endif
2464 2490
2465 // TieredCompilation needs at least 2 compiler threads. 2491 int min_number_of_compiler_threads = get_min_number_of_compiler_threads();
2466 const int num_min_compiler_threads = (TieredCompilation && (TieredStopAtLevel >= CompLevel_full_optimization)) ? 2 : CI_COMPILER_COUNT; 2492 // The default CICompilerCount's value is CI_COMPILER_COUNT.
2467 status &=verify_min_value(CICompilerCount, num_min_compiler_threads, "CICompilerCount"); 2493 assert(min_number_of_compiler_threads <= CI_COMPILER_COUNT, "minimum should be less or equal default number");
2494 // Check the minimum number of compiler threads
2495 status &=verify_min_value(CICompilerCount, min_number_of_compiler_threads, "CICompilerCount");
2468 2496
2469 return status; 2497 return status;
2470 } 2498 }
2471 2499
2472 bool Arguments::is_bad_option(const JavaVMOption* option, jboolean ignore, 2500 bool Arguments::is_bad_option(const JavaVMOption* option, jboolean ignore,

mercurial