comparison src/share/vm/runtime/java.cpp @ 7585:e0cf9af8978e

8005936: PrintNMTStatistics doesn't work for normal JVM exit Summary: Moved NMT shutdown code to JVM exit handler to ensure NMT statistics is printed when PrintNMTStatistics is enabled Reviewed-by: acorn, dholmes, coleenp
author zgu
date Fri, 11 Jan 2013 12:30:54 -0500
parents f34d701e952e
children 212c5b9c38e7
comparison
equal deleted inserted replaced
7466:0c93d4818214 7585:e0cf9af8978e
540 { MutexLocker ml(BeforeExit_lock); 540 { MutexLocker ml(BeforeExit_lock);
541 _before_exit_status = BEFORE_EXIT_DONE; 541 _before_exit_status = BEFORE_EXIT_DONE;
542 BeforeExit_lock->notify_all(); 542 BeforeExit_lock->notify_all();
543 } 543 }
544 544
545 // Shutdown NMT before exit. Otherwise,
546 // it will run into trouble when system destroys static variables.
547 MemTracker::shutdown(MemTracker::NMT_normal);
548
545 #undef BEFORE_EXIT_NOT_RUN 549 #undef BEFORE_EXIT_NOT_RUN
546 #undef BEFORE_EXIT_RUNNING 550 #undef BEFORE_EXIT_RUNNING
547 #undef BEFORE_EXIT_DONE 551 #undef BEFORE_EXIT_DONE
548 } 552 }
549 553