--- old/src/share/vm/compiler/compileBroker.cpp 2014-09-18 12:35:52.068052404 +0200 +++ new/src/share/vm/compiler/compileBroker.cpp 2014-09-18 12:35:51.952052399 +0200 @@ -783,18 +783,26 @@ void CompileBroker::print_compile_queues(outputStream* st) { - _c1_compile_queue->print(st); - _c2_compile_queue->print(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_locked_or_safepoint(lock()); + 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");; + st->print_cr("Empty"); } else { while (task != NULL) { task->print_compilation(st, NULL, true, true);