mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-17 09:34:38 +02:00
8211821: PrintStringTableStatistics crashes JVM
During JVM exit, print the Symbol and String tables before current thread gets deleted. Reviewed-by: iklam, dholmes
This commit is contained in:
parent
945623c998
commit
2e5653c166
3 changed files with 47 additions and 7 deletions
|
@ -4212,10 +4212,10 @@ void JavaThread::invoke_shutdown_hooks() {
|
|||
// <-- do not use anything that could get blocked by Safepoint -->
|
||||
// + Disable tracing at JNI/JVM barriers
|
||||
// + Set _vm_exited flag for threads that are still running native code
|
||||
// + Delete this thread
|
||||
// + Call exit_globals()
|
||||
// > deletes tty
|
||||
// > deletes PerfMemory resources
|
||||
// + Delete this thread
|
||||
// + Return to caller
|
||||
|
||||
bool Threads::destroy_vm() {
|
||||
|
@ -4291,6 +4291,9 @@ bool Threads::destroy_vm() {
|
|||
|
||||
notify_vm_shutdown();
|
||||
|
||||
// exit_globals() will delete tty
|
||||
exit_globals();
|
||||
|
||||
// We are after VM_Exit::set_vm_exited() so we can't call
|
||||
// thread->smr_delete() or we will block on the Threads_lock.
|
||||
// Deleting the shutdown thread here is safe because another
|
||||
|
@ -4304,9 +4307,6 @@ bool Threads::destroy_vm() {
|
|||
}
|
||||
#endif
|
||||
|
||||
// exit_globals() will delete tty
|
||||
exit_globals();
|
||||
|
||||
LogConfiguration::finalize();
|
||||
|
||||
return true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue