8155730: HeapInfoDCmd should get Heap_lock

Reviewed-by: tschatzl, jprovino
This commit is contained in:
Yasumasa Suenaga 2016-06-21 09:19:53 +02:00
parent 79377a1bf1
commit 5ae683a18f
3 changed files with 3 additions and 1 deletions

View file

@ -1070,13 +1070,13 @@ void Universe::compute_base_vtable_size() {
}
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();