comparison src/share/vm/runtime/thread.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 69627aa9ab10
children f422634e5828
comparison
equal deleted inserted replaced
7466:0c93d4818214 7585:e0cf9af8978e
4009 // 4009 //
4010 Threads_lock->wait(!Mutex::_no_safepoint_check_flag, 0, 4010 Threads_lock->wait(!Mutex::_no_safepoint_check_flag, 0,
4011 Mutex::_as_suspend_equivalent_flag); 4011 Mutex::_as_suspend_equivalent_flag);
4012 } 4012 }
4013 4013
4014 // Shutdown NMT before exit. Otherwise,
4015 // it will run into trouble when system destroys static variables.
4016 MemTracker::shutdown(MemTracker::NMT_normal);
4017
4018 // Hang forever on exit if we are reporting an error. 4014 // Hang forever on exit if we are reporting an error.
4019 if (ShowMessageBoxOnError && is_error_reported()) { 4015 if (ShowMessageBoxOnError && is_error_reported()) {
4020 os::infinite_sleep(); 4016 os::infinite_sleep();
4021 } 4017 }
4022 os::wait_for_keypress_at_exit(); 4018 os::wait_for_keypress_at_exit();