8209598: Clean up how messages are printed when CDS aborts start-up

Added a new function vm_exit_during_cds_dumping() to java.cpp so that it can be used when an error condition is encountered during CDS dumping.

Reviewed-by: iklam, dholmes, jiangli
This commit is contained in:
Calvin Cheung 2018-10-25 21:40:17 -07:00
parent 8dbea74827
commit 7c81535d46
6 changed files with 37 additions and 18 deletions

View file

@ -1646,12 +1646,11 @@ void MetaspaceShared::link_and_cleanup_shared_classes(TRAPS) {
} while (check_closure.made_progress());
if (IgnoreUnverifiableClassesDuringDump) {
// This is useful when running JCK or SQE tests. You should not
// enable this when running real apps.
// IgnoreUnverifiableClassesDuringDump is enabled by default.
// Unverifiable classes will not be included in the CDS archive.
SystemDictionary::remove_classes_in_error_state();
} else {
tty->print_cr("Please remove the unverifiable classes from your class list and try again");
exit(1);
vm_exit_during_cds_dumping("Please remove the unverifiable classes from your class list and try again");
}
}
}