8213000: Obsolete the IgnoreUnverifiableClassesDuringDump vm option
Summary: remove code referencing the IgnoreUnverifiableClassesDuringDump
Reviewed-by: dholmes, jiangli
--- a/src/hotspot/share/memory/metaspaceShared.cpp Wed Oct 31 13:58:15 2018 -0700
+++ b/src/hotspot/share/memory/metaspaceShared.cpp Wed Oct 31 14:00:51 2018 -0700
@@ -1645,13 +1645,8 @@
ClassLoaderDataGraph::unlocked_loaded_classes_do(&check_closure);
} while (check_closure.made_progress());
- if (IgnoreUnverifiableClassesDuringDump) {
- // IgnoreUnverifiableClassesDuringDump is enabled by default.
- // Unverifiable classes will not be included in the CDS archive.
- SystemDictionary::remove_classes_in_error_state();
- } else {
- vm_exit_during_cds_dumping("Please remove the unverifiable classes from your class list and try again");
- }
+ // Unverifiable classes will not be included in the CDS archive.
+ SystemDictionary::remove_classes_in_error_state();
}
}
--- a/src/hotspot/share/runtime/arguments.cpp Wed Oct 31 13:58:15 2018 -0700
+++ b/src/hotspot/share/runtime/arguments.cpp Wed Oct 31 14:00:51 2018 -0700
@@ -533,7 +533,6 @@
{ "MinRAMFraction", JDK_Version::jdk(10), JDK_Version::undefined(), JDK_Version::undefined() },
{ "InitialRAMFraction", JDK_Version::jdk(10), JDK_Version::undefined(), JDK_Version::undefined() },
{ "UseMembar", JDK_Version::jdk(10), JDK_Version::undefined(), JDK_Version::undefined() },
- { "IgnoreUnverifiableClassesDuringDump", JDK_Version::jdk(10), JDK_Version::undefined(), JDK_Version::undefined() },
{ "CompilerThreadHintNoPreempt", JDK_Version::jdk(11), JDK_Version::jdk(12), JDK_Version::jdk(13) },
{ "VMThreadHintNoPreempt", JDK_Version::jdk(11), JDK_Version::jdk(12), JDK_Version::jdk(13) },
@@ -555,6 +554,7 @@
{ "SharedMiscDataSize", JDK_Version::undefined(), JDK_Version::jdk(10), JDK_Version::undefined() },
{ "SharedMiscCodeSize", JDK_Version::undefined(), JDK_Version::jdk(10), JDK_Version::undefined() },
{ "AssumeMP", JDK_Version::jdk(10), JDK_Version::jdk(12), JDK_Version::jdk(13) },
+ { "IgnoreUnverifiableClassesDuringDump", JDK_Version::jdk(10), JDK_Version::jdk(12), JDK_Version::jdk(13) },
{ "UnlinkSymbolsALot", JDK_Version::jdk(11), JDK_Version::jdk(12), JDK_Version::jdk(13) },
{ "AllowNonVirtualCalls", JDK_Version::jdk(11), JDK_Version::jdk(12), JDK_Version::jdk(13) },
{ "PrintSafepointStatistics", JDK_Version::jdk(11), JDK_Version::jdk(12), JDK_Version::jdk(13) },
--- a/src/hotspot/share/runtime/globals.hpp Wed Oct 31 13:58:15 2018 -0700
+++ b/src/hotspot/share/runtime/globals.hpp Wed Oct 31 14:00:51 2018 -0700
@@ -2433,10 +2433,6 @@
"Average number of symbols per bucket in shared table") \
range(2, 246) \
\
- diagnostic(bool, IgnoreUnverifiableClassesDuringDump, true, \
- "Do not quit -Xshare:dump even if we encounter unverifiable " \
- "classes. Just exclude them from the shared dictionary.") \
- \
diagnostic(bool, PrintMethodHandleStubs, false, \
"Print generated stub code for method handles") \
\
--- a/test/hotspot/jtreg/runtime/CommandLine/VMDeprecatedOptions.java Wed Oct 31 13:58:15 2018 -0700
+++ b/test/hotspot/jtreg/runtime/CommandLine/VMDeprecatedOptions.java Wed Oct 31 14:00:51 2018 -0700
@@ -103,6 +103,5 @@
public static void main(String[] args) throws Throwable {
testDeprecated(DEPRECATED_OPTIONS); // Make sure that each deprecated option is mentioned in the output.
- testDeprecatedDiagnostic("IgnoreUnverifiableClassesDuringDump", "false");
}
}
--- a/test/hotspot/jtreg/runtime/appcds/VerifierTest.java Wed Oct 31 13:58:15 2018 -0700
+++ b/test/hotspot/jtreg/runtime/appcds/VerifierTest.java Wed Oct 31 14:00:51 2018 -0700
@@ -102,17 +102,17 @@
}
static void testset_0(String jar, String[] noAppClasses, String[] appClasses) throws Exception {
- // Dumping should fail if the IgnoreUnverifiableClassesDuringDump
- // option is not enabled.
- OutputAnalyzer output = TestCommon.dump(jar, appClasses,
- CDS_LOGGING,
- "-XX:+UnlockDiagnosticVMOptions",
- "-XX:-IgnoreUnverifiableClassesDuringDump");
- output.shouldContain("Please remove the unverifiable classes");
- output.shouldHaveExitValue(1);
-
- // By default, bad classes should be ignored during dumping.
- TestCommon.testDump(jar, appClasses);
+ // Unverifiable classes won't be included in the CDS archive.
+ // Dumping should not fail.
+ OutputAnalyzer output = TestCommon.dump(jar, appClasses);
+ output.shouldHaveExitValue(0);
+ if (output.getStdout().contains("Loading clases to share")) {
+ // last entry in appClasses[] is a verifiable class
+ for (int i = 0; i < (appClasses.length - 1); i++) {
+ output.shouldContain("Verification failed for " + appClasses[i]);
+ output.shouldContain("Removed error class: " + appClasses[i]);
+ }
+ }
}
static void checkRuntimeOutput(OutputAnalyzer output, String expected) throws Exception {