hotspot/src/share/vm/compiler/compileBroker.cpp
changeset 35825 7c7652ee137b
parent 35606 d873b64009cc
child 35845 30025047885d
equal deleted inserted replaced
35824:d3958ca72bf9 35825:7c7652ee137b
   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);
  2353                     _compilation_id, _last_compile_level, _last_method_compiled);
  2359                     _compilation_id, _last_compile_level, _last_method_compiled);
  2354     }
  2360     }
  2355   }
  2361   }
  2356 }
  2362 }
  2357 
  2363 
  2358 
       
  2359 void CompileBroker::print_compiler_threads_on(outputStream* st) {
       
  2360 #ifndef PRODUCT
       
  2361   st->print_cr("Compiler thread printing unimplemented.");
       
  2362   st->cr();
       
  2363 #endif
       
  2364 }