< prev index next >

src/share/vm/runtime/arguments.cpp

Print this page

        

*** 349,366 **** * * Tests: Aliases should be tested in VMAliasOptions.java. * Deprecated options should be tested in VMDeprecatedOptions.java. */ - // Obsolete or deprecated -XX flag. - typedef struct { - const char* name; - JDK_Version deprecated_in; // When the deprecation warning started (or "undefined"). - JDK_Version obsolete_in; // When the obsolete warning started (or "undefined"). - JDK_Version expired_in; // When the option expires (or "undefined"). - } SpecialFlag; - // The special_jvm_flags table declares options that are being deprecated and/or obsoleted. The // "deprecated_in" or "obsolete_in" fields may be set to "undefined", but not both. // When the JDK version reaches 'deprecated_in' limit, the JVM will process this flag on // the command-line as usual, but will issue a warning. // When the JDK version reaches 'obsolete_in' limit, the JVM will continue accepting this flag on --- 349,358 ----
*** 496,506 **** --- 488,505 ---- } else { return true; } } + extern bool lookup_special_flag_ext(const char *flag_name, SpecialFlag& flag); + static bool lookup_special_flag(const char *flag_name, SpecialFlag& flag) { + // Allow extensions to have priority + if (lookup_special_flag_ext(flag_name, flag)) { + return true; + } + for (size_t i = 0; special_jvm_flags[i].name != NULL; i++) { if ((strcmp(special_jvm_flags[i].name, flag_name) == 0)) { flag = special_jvm_flags[i]; return true; }
*** 1802,1811 **** --- 1801,1812 ---- void Arguments::select_gc_ergonomically() { #if INCLUDE_ALL_GCS if (os::is_server_class_machine()) { if (should_auto_select_low_pause_collector()) { FLAG_SET_ERGO_IF_DEFAULT(bool, UseConcMarkSweepGC, true); + FLAG_SET_ERGO_IF_DEFAULT(bool, UseParNewGC, true); + handle_extra_cms_flags("UseAutoGCSelectPolicy uses UseConcMarkSweepGC"); } else { FLAG_SET_ERGO_IF_DEFAULT(bool, UseG1GC, true); } } else { FLAG_SET_ERGO_IF_DEFAULT(bool, UseSerialGC, true);
*** 2868,2882 **** --- 2869,2885 ---- // -Xconcgc } else if (match_option(option, "-Xconcgc")) { if (FLAG_SET_CMDLINE(bool, UseConcMarkSweepGC, true) != Flag::SUCCESS) { return JNI_EINVAL; } + handle_extra_cms_flags("-Xconcgc uses UseConcMarkSweepGC"); // -Xnoconcgc } else if (match_option(option, "-Xnoconcgc")) { if (FLAG_SET_CMDLINE(bool, UseConcMarkSweepGC, false) != Flag::SUCCESS) { return JNI_EINVAL; } + handle_extra_cms_flags("-Xnoconcgc uses UseConcMarkSweepGC"); // -Xbatch } else if (match_option(option, "-Xbatch")) { if (FLAG_SET_CMDLINE(bool, BackgroundCompilation, false) != Flag::SUCCESS) { return JNI_EINVAL; }
*** 4159,4168 **** --- 4162,4180 ---- LogConfiguration::configure_stdout(LogLevel::Info, !PrintGCDetails, LOG_TAGS(gc)); } return true; } + void Arguments::handle_extra_cms_flags(const char* msg) { + SpecialFlag flag; + const char *flag_name = "UseConcMarkSweepGC"; + if (lookup_special_flag(flag_name, flag)) { + handle_aliases_and_deprecation(flag_name, /* print warning */ true); + warning("%s", msg); + } + } + // Parse entry point called from JNI_CreateJavaVM jint Arguments::parse(const JavaVMInitArgs* initial_cmd_args) { assert(verify_special_jvm_flags(), "deprecated and obsolete flag table inconsistent");
< prev index next >