464 if (is_c2_compile(comp_level)) return _c2_compile_queue; |
464 if (is_c2_compile(comp_level)) return _c2_compile_queue; |
465 if (is_c1_compile(comp_level)) return _c1_compile_queue; |
465 if (is_c1_compile(comp_level)) return _c1_compile_queue; |
466 return NULL; |
466 return NULL; |
467 } |
467 } |
468 |
468 |
469 |
|
470 void CompileBroker::print_compile_queues(outputStream* st) { |
469 void CompileBroker::print_compile_queues(outputStream* st) { |
|
470 st->print_cr("Current compiles: "); |
471 MutexLocker locker(MethodCompileQueue_lock); |
471 MutexLocker locker(MethodCompileQueue_lock); |
|
472 MutexLocker locker2(Threads_lock); |
|
473 |
|
474 char buf[2000]; |
|
475 int buflen = sizeof(buf); |
|
476 Threads::print_threads_compiling(st, buf, buflen); |
|
477 |
|
478 st->cr(); |
472 if (_c1_compile_queue != NULL) { |
479 if (_c1_compile_queue != NULL) { |
473 _c1_compile_queue->print(st); |
480 _c1_compile_queue->print(st); |
474 } |
481 } |
475 if (_c2_compile_queue != NULL) { |
482 if (_c2_compile_queue != NULL) { |
476 _c2_compile_queue->print(st); |
483 _c2_compile_queue->print(st); |
477 } |
484 } |
478 } |
485 } |
479 |
486 |
480 void CompileQueue::print(outputStream* st) { |
487 void CompileQueue::print(outputStream* st) { |
481 assert(MethodCompileQueue_lock->owned_by_self(), "must own lock"); |
488 assert(MethodCompileQueue_lock->owned_by_self(), "must own lock"); |
482 st->print_cr("Contents of %s", name()); |
489 st->print_cr("%s:", name()); |
483 st->print_cr("----------------------------"); |
|
484 CompileTask* task = _first; |
490 CompileTask* task = _first; |
485 if (task == NULL) { |
491 if (task == NULL) { |
486 st->print_cr("Empty"); |
492 st->print_cr("Empty"); |
487 } else { |
493 } else { |
488 while (task != NULL) { |
494 while (task != NULL) { |
489 task->print(st, NULL, true, true); |
495 task->print(st, NULL, true, true); |
490 task = task->next(); |
496 task = task->next(); |
491 } |
497 } |
492 } |
498 } |
493 st->print_cr("----------------------------"); |
499 st->cr(); |
494 } |
500 } |
495 |
501 |
496 void CompileQueue::print_tty() { |
502 void CompileQueue::print_tty() { |
497 ttyLocker ttyl; |
503 ttyLocker ttyl; |
498 print(tty); |
504 print(tty); |