mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-17 09:34:38 +02:00
8232081: Try to link all classes during dynamic CDS dump
During CDS dynamic dump, link all classes loaded by the builtin class loaders in JVM_BeforeHalt() and JavaThread::invoke_shutdown_hooks(). Reviewed-by: iklam, dholmes
This commit is contained in:
parent
8c1204de6b
commit
9e2ab1e363
6 changed files with 202 additions and 13 deletions
|
@ -4326,6 +4326,13 @@ void Threads::create_vm_init_libraries() {
|
|||
void JavaThread::invoke_shutdown_hooks() {
|
||||
HandleMark hm(this);
|
||||
|
||||
// Link all classes for dynamic CDS dumping before vm exit.
|
||||
// Same operation is being done in JVM_BeforeHalt for handling the
|
||||
// case where the application calls System.exit().
|
||||
if (DynamicDumpSharedSpaces) {
|
||||
MetaspaceShared::link_and_cleanup_shared_classes(this);
|
||||
}
|
||||
|
||||
// We could get here with a pending exception, if so clear it now.
|
||||
if (this->has_pending_exception()) {
|
||||
this->clear_pending_exception();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue