--- old/src/share/vm/memory/universe.cpp 2016-05-10 22:20:04.666699050 +0900 +++ new/src/share/vm/memory/universe.cpp 2016-05-10 22:20:04.528699937 +0900 @@ -1070,13 +1070,13 @@ } void Universe::print_on(outputStream* st) { + GCMutexLocker hl(Heap_lock); // Heap_lock might be locked by caller thread. st->print_cr("Heap"); heap()->print_on(st); } void Universe::print_heap_at_SIGBREAK() { if (PrintHeapAtSIGBREAK) { - MutexLocker hl(Heap_lock); print_on(tty); tty->cr(); tty->flush(); --- old/src/share/vm/services/diagnosticCommand.cpp 2016-05-10 22:20:05.231695420 +0900 +++ new/src/share/vm/services/diagnosticCommand.cpp 2016-05-10 22:20:05.095696294 +0900 @@ -413,6 +413,7 @@ } void HeapInfoDCmd::execute(DCmdSource source, TRAPS) { + MutexLocker hl(Heap_lock); Universe::heap()->print_on(output()); } --- old/src/share/vm/utilities/vmError.cpp 2016-05-10 22:20:05.785691861 +0900 +++ new/src/share/vm/utilities/vmError.cpp 2016-05-10 22:20:05.649692735 +0900 @@ -907,6 +907,7 @@ // STEP("printing heap information") if (Universe::is_fully_initialized()) { + MutexLocker hl(Heap_lock); Universe::heap()->print_on_error(st); st->cr(); st->print_cr("Polling page: " INTPTR_FORMAT, p2i(os::get_polling_page()));