8226304: Obsolete the -XX:+FailOverToOldVerifier option

Change the option from deprecated to obsolete

Reviewed-by: lfoltan, coleenp
This commit is contained in:
Harold Seigel 2019-06-19 13:34:31 -04:00
parent 41ca20f5b5
commit 69a123c769
3 changed files with 13 additions and 18 deletions

View File

@ -165,22 +165,28 @@ bool Verifier::verify(InstanceKlass* klass, bool should_verify_class, TRAPS) {
PerfClassTraceTime::CLASS_VERIFY);
// If the class should be verified, first see if we can use the split
// verifier. If not, or if verification fails and FailOverToOldVerifier
// is set, then call the inference verifier.
// verifier. If not, or if verification fails and can failover, then
// call the inference verifier.
Symbol* exception_name = NULL;
const size_t message_buffer_len = klass->name()->utf8_length() + 1024;
char* message_buffer = NULL;
char* exception_message = NULL;
bool can_failover = FailOverToOldVerifier &&
klass->major_version() < NOFAILOVER_MAJOR_VERSION;
log_info(class, init)("Start class verification for: %s", klass->external_name());
if (klass->major_version() >= STACKMAP_ATTRIBUTE_MAJOR_VERSION) {
ClassVerifier split_verifier(klass, THREAD);
split_verifier.verify_class(THREAD);
exception_name = split_verifier.result();
if (can_failover && !HAS_PENDING_EXCEPTION &&
// If DumpSharedSpaces is set then don't fall back to the old verifier on
// verification failure. If a class fails verification with the split verifier,
// it might fail the CDS runtime verifier constraint check. In that case, we
// don't want to share the class. We only archive classes that pass the split
// verifier.
bool can_failover = !DumpSharedSpaces &&
klass->major_version() < NOFAILOVER_MAJOR_VERSION;
if (can_failover && !HAS_PENDING_EXCEPTION && // Split verifier doesn't set PENDING_EXCEPTION for failure
(exception_name == vmSymbols::java_lang_VerifyError() ||
exception_name == vmSymbols::java_lang_ClassFormatError())) {
log_info(verification)("Fail over class verification to old verifier for: %s", klass->external_name());

View File

@ -533,7 +533,6 @@ static SpecialFlag const special_jvm_flags[] = {
{ "InitialRAMFraction", JDK_Version::jdk(10), JDK_Version::undefined(), JDK_Version::undefined() },
{ "UseMembar", JDK_Version::jdk(10), JDK_Version::jdk(12), JDK_Version::undefined() },
{ "CompilationPolicyChoice", JDK_Version::jdk(13), JDK_Version::jdk(14), JDK_Version::undefined() },
{ "FailOverToOldVerifier", JDK_Version::jdk(13), JDK_Version::jdk(14), JDK_Version::undefined() },
{ "AllowJNIEnvProxy", JDK_Version::jdk(13), JDK_Version::jdk(14), JDK_Version::jdk(15) },
{ "ThreadLocalHandshakes", JDK_Version::jdk(13), JDK_Version::jdk(14), JDK_Version::jdk(15) },
{ "AllowRedefinitionToAddDeleteMethods", JDK_Version::jdk(13), JDK_Version::undefined(), JDK_Version::undefined() },
@ -563,6 +562,7 @@ static SpecialFlag const special_jvm_flags[] = {
{ "ProfilerNumberOfRuntimeStubNodes", JDK_Version::undefined(), JDK_Version::jdk(13), JDK_Version::jdk(14) },
{ "UseImplicitStableValues", JDK_Version::undefined(), JDK_Version::jdk(13), JDK_Version::jdk(14) },
{ "NeedsDeoptSuspend", JDK_Version::undefined(), JDK_Version::jdk(13), JDK_Version::jdk(14) },
{ "FailOverToOldVerifier", JDK_Version::undefined(), JDK_Version::jdk(14), JDK_Version::jdk(15) },
#ifdef TEST_VERIFY_SPECIAL_JVM_FLAGS
// These entries will generate build errors. Their purpose is to test the macros.
@ -3465,14 +3465,6 @@ jint Arguments::parse_options_buffer(const char* name, char* buffer, const size_
void Arguments::set_shared_spaces_flags() {
if (DumpSharedSpaces) {
if (FailOverToOldVerifier) {
// Don't fall back to the old verifier on verification failure. If a
// class fails verification with the split verifier, it might fail the
// CDS runtime verifier constraint check. In that case, we don't want
// to share the class. We only archive classes that pass the split verifier.
FLAG_SET_DEFAULT(FailOverToOldVerifier, false);
}
if (RequireSharedSpaces) {
warning("Cannot dump shared archive while using shared archive");
}

View File

@ -405,9 +405,6 @@ const size_t minimumSymbolTableSize = 1024;
notproduct(bool, VerifyLastFrame, false, \
"Verify oops on last frame on entry to VM") \
\
product(bool, FailOverToOldVerifier, true, \
"Fail over to old verifier when split verifier fails") \
\
product(bool, SafepointTimeout, false, \
"Time out and warn or fail after SafepointTimeoutDelay " \
"milliseconds if failed to reach safepoint") \