< prev index next >

src/hotspot/share/gc/parallel/gcTaskThread.cpp

Print this page
rev 52189 : [mq]: tinit


  97     const uint max_index = MIN2(_time_stamp_index, GCTaskTimeStampEntries);
  98     for (uint i = 0; i < max_index; i++) {
  99       GCTaskTimeStamp* time_stamp = time_stamp_at(i);
 100       log_debug(gc, task, time)("\t[ %s " JLONG_FORMAT " " JLONG_FORMAT " ]",
 101                                 time_stamp->name(),
 102                                 time_stamp->entry_time(),
 103                                 time_stamp->exit_time());
 104     }
 105 
 106     // Reset after dumping the data
 107     _time_stamp_index = 0;
 108   }
 109 }
 110 
 111 // GC workers get tasks from the GCTaskManager and execute
 112 // them in this method.  If there are no tasks to execute,
 113 // the GC workers wait in the GCTaskManager's get_task()
 114 // for tasks to be enqueued for execution.
 115 
 116 void GCTaskThread::run() {
 117   // Set up the thread for stack overflow support
 118   this->record_stack_base_and_size();
 119   this->initialize_named_thread();
 120   // Bind yourself to your processor.
 121   if (processor_id() != GCTaskManager::sentinel_worker()) {
 122     log_trace(gc, task, thread)("GCTaskThread::run: binding to processor %u", processor_id());
 123     if (!os::bind_to_processor(processor_id())) {
 124       DEBUG_ONLY(
 125         log_warning(gc)("Couldn't bind GCTaskThread %u to processor %u",
 126                         which(), processor_id());
 127       )
 128     }
 129   }
 130   // Part of thread setup.
 131   // ??? Are these set up once here to make subsequent ones fast?
 132   HandleMark   hm_outer;
 133   ResourceMark rm_outer;
 134 
 135   TimeStamp timer;
 136 
 137   for (;/* ever */;) {
 138     // These are so we can flush the resources allocated in the inner loop.




  97     const uint max_index = MIN2(_time_stamp_index, GCTaskTimeStampEntries);
  98     for (uint i = 0; i < max_index; i++) {
  99       GCTaskTimeStamp* time_stamp = time_stamp_at(i);
 100       log_debug(gc, task, time)("\t[ %s " JLONG_FORMAT " " JLONG_FORMAT " ]",
 101                                 time_stamp->name(),
 102                                 time_stamp->entry_time(),
 103                                 time_stamp->exit_time());
 104     }
 105 
 106     // Reset after dumping the data
 107     _time_stamp_index = 0;
 108   }
 109 }
 110 
 111 // GC workers get tasks from the GCTaskManager and execute
 112 // them in this method.  If there are no tasks to execute,
 113 // the GC workers wait in the GCTaskManager's get_task()
 114 // for tasks to be enqueued for execution.
 115 
 116 void GCTaskThread::run() {


 117   this->initialize_named_thread();
 118   // Bind yourself to your processor.
 119   if (processor_id() != GCTaskManager::sentinel_worker()) {
 120     log_trace(gc, task, thread)("GCTaskThread::run: binding to processor %u", processor_id());
 121     if (!os::bind_to_processor(processor_id())) {
 122       DEBUG_ONLY(
 123         log_warning(gc)("Couldn't bind GCTaskThread %u to processor %u",
 124                         which(), processor_id());
 125       )
 126     }
 127   }
 128   // Part of thread setup.
 129   // ??? Are these set up once here to make subsequent ones fast?
 130   HandleMark   hm_outer;
 131   ResourceMark rm_outer;
 132 
 133   TimeStamp timer;
 134 
 135   for (;/* ever */;) {
 136     // These are so we can flush the resources allocated in the inner loop.


< prev index next >