< prev index next >

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

Print this page
rev 11508 : 8157240: GC task trace logging is incomprehensible
Reviewed-by: tschatzl


 159   void set_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   }
 169 
 170   // Add GC workers as needed.
 171   void add_workers(bool initializing);
 172 
 173   // Add GC workers as needed to reach the specified number of workers.
 174   void add_workers(uint active_workers, bool initializing);
 175 
 176   // Return the Ith worker.
 177   AbstractGangWorker* worker(uint i) const;
 178 



 179   void threads_do(ThreadClosure* tc) const;
 180 
 181   // Create a GC worker and install it into the work gang.
 182   virtual AbstractGangWorker* install_worker(uint which);
 183 
 184   // Debugging.
 185   const char* name() const { return _name; }
 186 
 187   // Printing
 188   void print_worker_threads_on(outputStream *st) const;
 189   void print_worker_threads() const {
 190     print_worker_threads_on(tty);
 191   }
 192 
 193  protected:
 194   virtual AbstractGangWorker* allocate_worker(uint which) = 0;
 195 };
 196 
 197 // An class representing a gang of workers.
 198 class WorkGang: public AbstractWorkGang {




 159   void set_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   }
 169 
 170   // Add GC workers as needed.
 171   void add_workers(bool initializing);
 172 
 173   // Add GC workers as needed to reach the specified number of workers.
 174   void add_workers(uint active_workers, bool initializing);
 175 
 176   // Return the Ith worker.
 177   AbstractGangWorker* worker(uint i) const;
 178 
 179   // Base name (without worker id #) of threads.
 180   const char* group_name() { return name(); }
 181 
 182   void threads_do(ThreadClosure* tc) const;
 183 
 184   // Create a GC worker and install it into the work gang.
 185   virtual AbstractGangWorker* install_worker(uint which);
 186 
 187   // Debugging.
 188   const char* name() const { return _name; }
 189 
 190   // Printing
 191   void print_worker_threads_on(outputStream *st) const;
 192   void print_worker_threads() const {
 193     print_worker_threads_on(tty);
 194   }
 195 
 196  protected:
 197   virtual AbstractGangWorker* allocate_worker(uint which) = 0;
 198 };
 199 
 200 // An class representing a gang of workers.
 201 class WorkGang: public AbstractWorkGang {


< prev index next >