src/hotspot/share/compiler/compileTask.cpp
changeset 59056 15936b142f86
parent 55206 2fe2063fe567
equal deleted inserted replaced
59055:57ad70bcf06c 59056:15936b142f86
   338   // <task id='9' method='M' osr_bci='X' level='1' blocking='1' stamp='1.234'>
   338   // <task id='9' method='M' osr_bci='X' level='1' blocking='1' stamp='1.234'>
   339   log->print(" compile_id='%d'", _compile_id);
   339   log->print(" compile_id='%d'", _compile_id);
   340   if (_osr_bci != CompileBroker::standard_entry_bci) {
   340   if (_osr_bci != CompileBroker::standard_entry_bci) {
   341     log->print(" compile_kind='osr'");  // same as nmethod::compile_kind
   341     log->print(" compile_kind='osr'");  // same as nmethod::compile_kind
   342   } // else compile_kind='c2c'
   342   } // else compile_kind='c2c'
   343   if (!method.is_null())  log->method(method);
   343   if (!method.is_null())  log->method(method());
   344   if (_osr_bci != CompileBroker::standard_entry_bci) {
   344   if (_osr_bci != CompileBroker::standard_entry_bci) {
   345     log->print(" osr_bci='%d'", _osr_bci);
   345     log->print(" osr_bci='%d'", _osr_bci);
   346   }
   346   }
   347   if (_comp_level != CompLevel_highest_tier) {
   347   if (_comp_level != CompLevel_highest_tier) {
   348     log->print(" level='%d'", _comp_level);
   348     log->print(" level='%d'", _comp_level);
   354 }
   354 }
   355 
   355 
   356 // ------------------------------------------------------------------
   356 // ------------------------------------------------------------------
   357 // CompileTask::log_task_queued
   357 // CompileTask::log_task_queued
   358 void CompileTask::log_task_queued() {
   358 void CompileTask::log_task_queued() {
   359   Thread* thread = Thread::current();
       
   360   ttyLocker ttyl;
   359   ttyLocker ttyl;
   361   ResourceMark rm(thread);
   360   ResourceMark rm;
   362 
   361 
   363   xtty->begin_elem("task_queued");
   362   xtty->begin_elem("task_queued");
   364   log_task(xtty);
   363   log_task(xtty);
   365   assert(_compile_reason > CompileTask::Reason_None && _compile_reason < CompileTask::Reason_Count, "Valid values");
   364   assert(_compile_reason > CompileTask::Reason_None && _compile_reason < CompileTask::Reason_Count, "Valid values");
   366   xtty->print(" comment='%s'", reason_name(_compile_reason));
   365   xtty->print(" comment='%s'", reason_name(_compile_reason));
   367 
   366 
   368   if (_hot_method != NULL) {
   367   if (_hot_method != NULL && _hot_method != _method) {
   369     methodHandle hot(thread, _hot_method);
   368     xtty->method(_hot_method);
   370     methodHandle method(thread, _method);
       
   371     if (hot() != method()) {
       
   372       xtty->method(hot);
       
   373     }
       
   374   }
   369   }
   375   if (_hot_count != 0) {
   370   if (_hot_count != 0) {
   376     xtty->print(" hot_count='%d'", _hot_count);
   371     xtty->print(" hot_count='%d'", _hot_count);
   377   }
   372   }
   378   xtty->end_elem();
   373   xtty->end_elem();