8213000: Obsolete the IgnoreUnverifiableClassesDuringDump vm option
Remove code referencing the IgnoreUnverifiableClassesDuringDump Reviewed-by: dholmes, jiangli
This commit is contained in:
parent
b627cee532
commit
fc19077b52
@ -1645,13 +1645,8 @@ void MetaspaceShared::link_and_cleanup_shared_classes(TRAPS) {
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -533,7 +533,6 @@ static SpecialFlag const special_jvm_flags[] = {
|
||||
{ "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 @@ static SpecialFlag const special_jvm_flags[] = {
|
||||
{ "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) },
|
||||
|
@ -2433,10 +2433,6 @@ define_pd_global(uint64_t,MaxRAM, 1ULL*G);
|
||||
"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") \
|
||||
\
|
||||
|
@ -103,6 +103,5 @@ public class VMDeprecatedOptions {
|
||||
|
||||
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");
|
||||
}
|
||||
}
|
||||
|
@ -102,17 +102,17 @@ public class VerifierTest implements Opcodes {
|
||||
}
|
||||
|
||||
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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user