145 uint total_workers() const { return _total_workers; }
146
147 uint created_workers() const {
148 return _created_workers;
149 }
150
151 virtual uint active_workers() const {
152 assert(_active_workers <= _total_workers,
153 "_active_workers: %u > _total_workers: %u", _active_workers, _total_workers);
154 assert(UseDynamicNumberOfGCThreads || _active_workers == _total_workers,
155 "Unless dynamic should use total workers");
156 return _active_workers;
157 }
158
159 uint update_active_workers(uint v) {
160 assert(v <= _total_workers,
161 "Trying to set more workers active than there are");
162 _active_workers = MIN2(v, _total_workers);
163 add_workers(false /* exit_on_failure */);
164 assert(v != 0, "Trying to set active workers to 0");
165 log_info(gc, task)("GC Workers: using %d out of %d", _active_workers, _total_workers);
166 return _active_workers;
167 }
168
169 // Add GC workers as needed.
170 void add_workers(bool initializing);
171
172 // Add GC workers as needed to reach the specified number of workers.
173 void add_workers(uint active_workers, bool initializing);
174
175 // Return the Ith worker.
176 AbstractGangWorker* worker(uint i) const;
177
178 // Base name (without worker id #) of threads.
179 const char* group_name() { return name(); }
180
181 void threads_do(ThreadClosure* tc) const;
182
183 // Create a GC worker and install it into the work gang.
184 virtual AbstractGangWorker* install_worker(uint which);
185
|
145 uint total_workers() const { return _total_workers; }
146
147 uint created_workers() const {
148 return _created_workers;
149 }
150
151 virtual uint active_workers() const {
152 assert(_active_workers <= _total_workers,
153 "_active_workers: %u > _total_workers: %u", _active_workers, _total_workers);
154 assert(UseDynamicNumberOfGCThreads || _active_workers == _total_workers,
155 "Unless dynamic should use total workers");
156 return _active_workers;
157 }
158
159 uint update_active_workers(uint v) {
160 assert(v <= _total_workers,
161 "Trying to set more workers active than there are");
162 _active_workers = MIN2(v, _total_workers);
163 add_workers(false /* exit_on_failure */);
164 assert(v != 0, "Trying to set active workers to 0");
165 log_trace(gc, task)("%s: using %d out of %d workers", name(), _active_workers, _total_workers);
166 return _active_workers;
167 }
168
169 // Add GC workers as needed.
170 void add_workers(bool initializing);
171
172 // Add GC workers as needed to reach the specified number of workers.
173 void add_workers(uint active_workers, bool initializing);
174
175 // Return the Ith worker.
176 AbstractGangWorker* worker(uint i) const;
177
178 // Base name (without worker id #) of threads.
179 const char* group_name() { return name(); }
180
181 void threads_do(ThreadClosure* tc) const;
182
183 // Create a GC worker and install it into the work gang.
184 virtual AbstractGangWorker* install_worker(uint which);
185
|