8213000: Obsolete the IgnoreUnverifiableClassesDuringDump vm option

Remove code referencing the IgnoreUnverifiableClassesDuringDump

Reviewed-by: dholmes, jiangli
This commit is contained in:
Calvin Cheung 2018-10-31 14:00:51 -07:00
parent b627cee532
commit fc19077b52
5 changed files with 14 additions and 24 deletions

View File

@ -1645,13 +1645,8 @@ void MetaspaceShared::link_and_cleanup_shared_classes(TRAPS) {
ClassLoaderDataGraph::unlocked_loaded_classes_do(&check_closure); ClassLoaderDataGraph::unlocked_loaded_classes_do(&check_closure);
} while (check_closure.made_progress()); } while (check_closure.made_progress());
if (IgnoreUnverifiableClassesDuringDump) { // Unverifiable classes will not be included in the CDS archive.
// IgnoreUnverifiableClassesDuringDump is enabled by default. SystemDictionary::remove_classes_in_error_state();
// 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");
}
} }
} }

View File

@ -533,7 +533,6 @@ static SpecialFlag const special_jvm_flags[] = {
{ "MinRAMFraction", JDK_Version::jdk(10), JDK_Version::undefined(), JDK_Version::undefined() }, { "MinRAMFraction", JDK_Version::jdk(10), JDK_Version::undefined(), JDK_Version::undefined() },
{ "InitialRAMFraction", 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() }, { "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) }, { "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) }, { "VMThreadHintNoPreempt", JDK_Version::jdk(11), JDK_Version::jdk(12), JDK_Version::jdk(13) },
@ -555,6 +554,7 @@ static SpecialFlag const special_jvm_flags[] = {
{ "SharedMiscDataSize", JDK_Version::undefined(), JDK_Version::jdk(10), JDK_Version::undefined() }, { "SharedMiscDataSize", JDK_Version::undefined(), JDK_Version::jdk(10), JDK_Version::undefined() },
{ "SharedMiscCodeSize", 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) }, { "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) }, { "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) }, { "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) }, { "PrintSafepointStatistics", JDK_Version::jdk(11), JDK_Version::jdk(12), JDK_Version::jdk(13) },

View File

@ -2433,10 +2433,6 @@ define_pd_global(uint64_t,MaxRAM, 1ULL*G);
"Average number of symbols per bucket in shared table") \ "Average number of symbols per bucket in shared table") \
range(2, 246) \ 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, \ diagnostic(bool, PrintMethodHandleStubs, false, \
"Print generated stub code for method handles") \ "Print generated stub code for method handles") \
\ \

View File

@ -103,6 +103,5 @@ public class VMDeprecatedOptions {
public static void main(String[] args) throws Throwable { public static void main(String[] args) throws Throwable {
testDeprecated(DEPRECATED_OPTIONS); // Make sure that each deprecated option is mentioned in the output. testDeprecated(DEPRECATED_OPTIONS); // Make sure that each deprecated option is mentioned in the output.
testDeprecatedDiagnostic("IgnoreUnverifiableClassesDuringDump", "false");
} }
} }

View File

@ -102,17 +102,17 @@ public class VerifierTest implements Opcodes {
} }
static void testset_0(String jar, String[] noAppClasses, String[] appClasses) throws Exception { static void testset_0(String jar, String[] noAppClasses, String[] appClasses) throws Exception {
// Dumping should fail if the IgnoreUnverifiableClassesDuringDump // Unverifiable classes won't be included in the CDS archive.
// option is not enabled. // Dumping should not fail.
OutputAnalyzer output = TestCommon.dump(jar, appClasses, OutputAnalyzer output = TestCommon.dump(jar, appClasses);
CDS_LOGGING, output.shouldHaveExitValue(0);
"-XX:+UnlockDiagnosticVMOptions", if (output.getStdout().contains("Loading clases to share")) {
"-XX:-IgnoreUnverifiableClassesDuringDump"); // last entry in appClasses[] is a verifiable class
output.shouldContain("Please remove the unverifiable classes"); for (int i = 0; i < (appClasses.length - 1); i++) {
output.shouldHaveExitValue(1); output.shouldContain("Verification failed for " + appClasses[i]);
output.shouldContain("Removed error class: " + appClasses[i]);
// By default, bad classes should be ignored during dumping. }
TestCommon.testDump(jar, appClasses); }
} }
static void checkRuntimeOutput(OutputAnalyzer output, String expected) throws Exception { static void checkRuntimeOutput(OutputAnalyzer output, String expected) throws Exception {