src/share/vm/compiler/compileBroker.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hs-comp Cdiff src/share/vm/compiler/compileBroker.cpp

src/share/vm/compiler/compileBroker.cpp

Print this page
rev 7050 : 8058461: serviceability/dcmd/CodelistTest.java and serviceability/dcmd/CompilerQueueTest.java SIGSEGV
Summary: Print only alive nmethods and add lock to print compile queue
Reviewed-by:

*** 781,802 **** return NULL; } void CompileBroker::print_compile_queues(outputStream* st) { ! _c1_compile_queue->print(st); ! _c2_compile_queue->print(st); } void CompileQueue::print(outputStream* st) { ! assert_locked_or_safepoint(lock()); st->print_cr("Contents of %s", name()); st->print_cr("----------------------------"); CompileTask* task = _first; if (task == NULL) { ! st->print_cr("Empty");; } else { while (task != NULL) { task->print_compilation(st, NULL, true, true); task = task->next(); } --- 781,810 ---- return NULL; } void CompileBroker::print_compile_queues(outputStream* st) { ! if (_c1_compile_queue != NULL) { ! _c1_compile_queue->print_with_lock(st); ! } ! if (_c2_compile_queue != NULL) { ! _c2_compile_queue->print_with_lock(st); ! } } + void CompileQueue::print_with_lock(outputStream* st) { + MutexLocker locker(lock()); + print(st); + } void CompileQueue::print(outputStream* st) { ! assert(lock()->owned_by_self(), "must own lock"); st->print_cr("Contents of %s", name()); st->print_cr("----------------------------"); CompileTask* task = _first; if (task == NULL) { ! st->print_cr("Empty"); } else { while (task != NULL) { task->print_compilation(st, NULL, true, true); task = task->next(); }
src/share/vm/compiler/compileBroker.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File