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