mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-25 22:04:51 +02:00
8005936: PrintNMTStatistics doesn't work for normal JVM exit
Moved NMT shutdown code to JVM exit handler to ensure NMT statistics is printed when PrintNMTStatistics is enabled Reviewed-by: acorn, dholmes, coleenp
This commit is contained in:
parent
f4da82981d
commit
93d2366337
2 changed files with 4 additions and 4 deletions
|
@ -542,6 +542,10 @@ void before_exit(JavaThread * thread) {
|
|||
BeforeExit_lock->notify_all();
|
||||
}
|
||||
|
||||
// Shutdown NMT before exit. Otherwise,
|
||||
// it will run into trouble when system destroys static variables.
|
||||
MemTracker::shutdown(MemTracker::NMT_normal);
|
||||
|
||||
#undef BEFORE_EXIT_NOT_RUN
|
||||
#undef BEFORE_EXIT_RUNNING
|
||||
#undef BEFORE_EXIT_DONE
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue