< prev index next >

src/share/vm/gc/parallel/gcTaskThread.hpp

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


  38   friend class GCTaskManager;
  39 private:
  40   // Instance state.
  41   GCTaskManager* _manager;              // Manager for worker.
  42   const uint     _processor_id;         // Which processor the worker is on.
  43 
  44   GCTaskTimeStamp* _time_stamps;
  45   uint _time_stamp_index;
  46 
  47   GCTaskTimeStamp* time_stamp_at(uint index);
  48 
  49   bool _is_working;                     // True if participating in GC tasks
  50 
  51   // Factory create and destroy methods.
  52   static GCTaskThread* create(GCTaskManager* manager,
  53                               uint           which,
  54                               uint           processor_id) {
  55     return new GCTaskThread(manager, which, processor_id);
  56   }
  57  public:
  58   static const char* task_name();
  59 
  60   static void destroy(GCTaskThread* manager) {
  61     if (manager != NULL) {
  62       delete manager;
  63     }
  64   }
  65   // Methods from Thread.
  66   bool is_GC_task_thread() const {
  67     return true;
  68   }
  69   virtual void run();
  70 
  71   void print_task_time_stamps();
  72 
  73 protected:
  74   // Constructor.  Clients use factory, but there could be subclasses.
  75   GCTaskThread(GCTaskManager* manager, uint which, uint processor_id);
  76   // Destructor: virtual destructor because of virtual methods.
  77   virtual ~GCTaskThread();
  78   // Accessors.




  38   friend class GCTaskManager;
  39 private:
  40   // Instance state.
  41   GCTaskManager* _manager;              // Manager for worker.
  42   const uint     _processor_id;         // Which processor the worker is on.
  43 
  44   GCTaskTimeStamp* _time_stamps;
  45   uint _time_stamp_index;
  46 
  47   GCTaskTimeStamp* time_stamp_at(uint index);
  48 
  49   bool _is_working;                     // True if participating in GC tasks
  50 
  51   // Factory create and destroy methods.
  52   static GCTaskThread* create(GCTaskManager* manager,
  53                               uint           which,
  54                               uint           processor_id) {
  55     return new GCTaskThread(manager, which, processor_id);
  56   }
  57  public:

  58 
  59   static void destroy(GCTaskThread* manager) {
  60     if (manager != NULL) {
  61       delete manager;
  62     }
  63   }
  64   // Methods from Thread.
  65   bool is_GC_task_thread() const {
  66     return true;
  67   }
  68   virtual void run();
  69 
  70   void print_task_time_stamps();
  71 
  72 protected:
  73   // Constructor.  Clients use factory, but there could be subclasses.
  74   GCTaskThread(GCTaskManager* manager, uint which, uint processor_id);
  75   // Destructor: virtual destructor because of virtual methods.
  76   virtual ~GCTaskThread();
  77   // Accessors.


< prev index next >