hotspot/src/share/vm/gc/parallel/gcTaskThread.cpp
changeset 35177 22c9af3d46fd
parent 35061 be6025ebffea
child 35460 1fca55136d66
equal deleted inserted replaced
35176:11a9d4022d9e 35177:22c9af3d46fd
   150         manager()->note_completion(which());
   150         manager()->note_completion(which());
   151 
   151 
   152         if (log_is_enabled(Debug, gc, task, time)) {
   152         if (log_is_enabled(Debug, gc, task, time)) {
   153           timer.update();
   153           timer.update();
   154 
   154 
   155           GCTaskTimeStamp* time_stamp = time_stamp_at(_time_stamp_index++);
   155           GCTaskTimeStamp* time_stamp = time_stamp_at(_time_stamp_index);
   156 
   156 
   157           time_stamp->set_name(name);
   157           time_stamp->set_name(name);
   158           time_stamp->set_entry_time(entry_time);
   158           time_stamp->set_entry_time(entry_time);
   159           time_stamp->set_exit_time(timer.ticks());
   159           time_stamp->set_exit_time(timer.ticks());
       
   160 
       
   161           // Update the index after we have set up the entry correctly since
       
   162           // GCTaskThread::print_task_time_stamps() may read this value concurrently.
       
   163           _time_stamp_index++;
   160         }
   164         }
   161       } else {
   165       } else {
   162         // idle tasks complete outside the normal accounting
   166         // idle tasks complete outside the normal accounting
   163         // so that a task can complete without waiting for idle tasks.
   167         // so that a task can complete without waiting for idle tasks.
   164         // They have to be terminated separately.
   168         // They have to be terminated separately.