< prev index next >

src/share/vm/gc/shared/workgroup.hpp

Print this page




 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     assert(UseDynamicNumberOfGCThreads || _active_workers == _total_workers,
 166            "Unless dynamic should use total workers");
 167     log_info(gc, task)("GC Workers: using %d out of %d", _active_workers, _total_workers);
 168     return _active_workers;
 169   }
 170 
 171   // Add GC workers as needed.
 172   void add_workers(bool initializing);
 173 
 174   // Add GC workers as needed to reach the specified number of workers.
 175   void add_workers(uint active_workers, bool initializing);
 176 
 177   // Return the Ith worker.
 178   AbstractGangWorker* worker(uint i) const;
 179 
 180   void threads_do(ThreadClosure* tc) const;
 181 
 182   // Create a GC worker and install it into the work gang.
 183   virtual AbstractGangWorker* install_worker(uint which);
 184 
 185   // Debugging.
 186   const char* name() const { return _name; }




 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   void threads_do(ThreadClosure* tc) const;
 179 
 180   // Create a GC worker and install it into the work gang.
 181   virtual AbstractGangWorker* install_worker(uint which);
 182 
 183   // Debugging.
 184   const char* name() const { return _name; }


< prev index next >