src/share/vm/runtime/arguments.cpp

changeset 7710
b1cf34d57e78
parent 7708
12478c5eb000
parent 7315
86307d477907
child 7715
f3ffb37f88a6
     1.1 --- a/src/share/vm/runtime/arguments.cpp	Fri Oct 31 17:09:14 2014 -0700
     1.2 +++ b/src/share/vm/runtime/arguments.cpp	Thu Nov 06 09:39:49 2014 -0800
     1.3 @@ -66,7 +66,7 @@
     1.4  #endif // INCLUDE_ALL_GCS
     1.5  
     1.6  // Note: This is a special bug reporting site for the JVM
     1.7 -#define DEFAULT_VENDOR_URL_BUG "http://bugreport.sun.com/bugreport/crash.jsp"
     1.8 +#define DEFAULT_VENDOR_URL_BUG "http://bugreport.java.com/bugreport/crash.jsp"
     1.9  #define DEFAULT_JAVA_LAUNCHER  "generic"
    1.10  
    1.11  // Disable options not supported in this release, with a warning if they
    1.12 @@ -300,6 +300,7 @@
    1.13    { "UseStringCache",                JDK_Version::jdk(8), JDK_Version::jdk(9) },
    1.14    { "UseOldInlining",                JDK_Version::jdk(9), JDK_Version::jdk(10) },
    1.15    { "AutoShutdownNMT",               JDK_Version::jdk(9), JDK_Version::jdk(10) },
    1.16 +  { "CompilationRepeat",             JDK_Version::jdk(8), JDK_Version::jdk(9) },
    1.17  #ifdef PRODUCT
    1.18    { "DesiredMethodLimit",
    1.19                             JDK_Version::jdk_update(7, 2), JDK_Version::jdk(8) },
    1.20 @@ -1144,6 +1145,32 @@
    1.21    }
    1.22  }
    1.23  
    1.24 +/**
    1.25 + * Returns the minimum number of compiler threads needed to run the JVM. The following
    1.26 + * configurations are possible.
    1.27 + *
    1.28 + * 1) The JVM is build using an interpreter only. As a result, the minimum number of
    1.29 + *    compiler threads is 0.
    1.30 + * 2) The JVM is build using the compiler(s) and tiered compilation is disabled. As
    1.31 + *    a result, either C1 or C2 is used, so the minimum number of compiler threads is 1.
    1.32 + * 3) The JVM is build using the compiler(s) and tiered compilation is enabled. However,
    1.33 + *    the option "TieredStopAtLevel < CompLevel_full_optimization". As a result, only
    1.34 + *    C1 can be used, so the minimum number of compiler threads is 1.
    1.35 + * 4) The JVM is build using the compilers and tiered compilation is enabled. The option
    1.36 + *    'TieredStopAtLevel = CompLevel_full_optimization' (the default value). As a result,
    1.37 + *    the minimum number of compiler threads is 2.
    1.38 + */
    1.39 +int Arguments::get_min_number_of_compiler_threads() {
    1.40 +#if !defined(COMPILER1) && !defined(COMPILER2) && !defined(SHARK)
    1.41 +  return 0;   // case 1
    1.42 +#else
    1.43 +  if (!TieredCompilation || (TieredStopAtLevel < CompLevel_full_optimization)) {
    1.44 +    return 1; // case 2 or case 3
    1.45 +  }
    1.46 +  return 2;   // case 4 (tiered)
    1.47 +#endif
    1.48 +}
    1.49 +
    1.50  #if INCLUDE_ALL_GCS
    1.51  static void disable_adaptive_size_policy(const char* collector_name) {
    1.52    if (UseAdaptiveSizePolicy) {
    1.53 @@ -2461,6 +2488,12 @@
    1.54    status &= verify_interval(SafepointPollOffset, 0, os::vm_page_size() - BytesPerWord, "SafepointPollOffset");
    1.55  #endif
    1.56  
    1.57 +  int min_number_of_compiler_threads = get_min_number_of_compiler_threads();
    1.58 +  // The default CICompilerCount's value is CI_COMPILER_COUNT.
    1.59 +  assert(min_number_of_compiler_threads <= CI_COMPILER_COUNT, "minimum should be less or equal default number");
    1.60 +  // Check the minimum number of compiler threads
    1.61 +  status &=verify_min_value(CICompilerCount, min_number_of_compiler_threads, "CICompilerCount");
    1.62 +
    1.63    return status;
    1.64  }
    1.65  
    1.66 @@ -3617,6 +3650,8 @@
    1.67    bool settings_file_specified = false;
    1.68    bool needs_hotspotrc_warning = false;
    1.69  
    1.70 +  ArgumentsExt::process_options(args);
    1.71 +
    1.72    const char* flags_file;
    1.73    int index;
    1.74    for (index = 0; index < args->nOptions; index++) {

mercurial