8276787: Improve warning messages for -XX:+RecordDynamicDumpInfo

Reviewed-by: ccheung, stuefe
This commit is contained in:
Ioi Lam 2021-11-16 21:03:33 +00:00
parent 8ed384cfb6
commit a77d8ddf11
11 changed files with 255 additions and 113 deletions

View file

@ -503,9 +503,10 @@ void before_exit(JavaThread* thread) {
os::terminate_signal_thread();
#if INCLUDE_CDS
if (DynamicDumpSharedSpaces) {
if (DynamicArchive::should_dump_at_vm_exit()) {
assert(ArchiveClassesAtExit != NULL, "Must be already set");
ExceptionMark em(thread);
DynamicArchive::dump(thread);
DynamicArchive::dump(ArchiveClassesAtExit, thread);
if (thread->has_pending_exception()) {
ResourceMark rm(thread);
oop pending_exception = thread->pending_exception();