< prev index next >

src/hotspot/share/gc/shared/gcTimer.hpp

Print this page
rev 52044 : 8157728: Covert GCTimer_test to GTest
Reviewed-by: duke


 112 
 113   int num_phases() const;
 114   GCPhase* phase_at(int index) const;
 115 
 116   const Tickspan sum_of_pauses() const { return _sum_of_pauses; }
 117   const Tickspan longest_pause() const { return _longest_pause; }
 118 
 119   bool has_active_phases();
 120 
 121  private:
 122   void update_statistics(GCPhase* phase);
 123 };
 124 
 125 class PhasesIterator {
 126  public:
 127   virtual bool has_next() = 0;
 128   virtual GCPhase* next() = 0;
 129 };
 130 
 131 class GCTimer : public ResourceObj {
 132   NOT_PRODUCT(friend class GCTimerTest;)
 133  protected:
 134   Ticks _gc_start;
 135   Ticks _gc_end;
 136   TimePartitions _time_partitions;
 137 
 138  public:
 139   virtual void register_gc_start(const Ticks& time = Ticks::now());
 140   virtual void register_gc_end(const Ticks& time = Ticks::now());
 141 
 142   void register_gc_phase_start(const char* name, const Ticks& time);
 143   void register_gc_phase_end(const Ticks& time);
 144 
 145   const Ticks gc_start() const { return _gc_start; }
 146   const Ticks gc_end() const { return _gc_end; }
 147 
 148   TimePartitions* time_partitions() { return &_time_partitions; }
 149 
 150  protected:
 151   void register_gc_pause_start(const char* name, const Ticks& time = Ticks::now());
 152   void register_gc_pause_end(const Ticks& time = Ticks::now());




 112 
 113   int num_phases() const;
 114   GCPhase* phase_at(int index) const;
 115 
 116   const Tickspan sum_of_pauses() const { return _sum_of_pauses; }
 117   const Tickspan longest_pause() const { return _longest_pause; }
 118 
 119   bool has_active_phases();
 120 
 121  private:
 122   void update_statistics(GCPhase* phase);
 123 };
 124 
 125 class PhasesIterator {
 126  public:
 127   virtual bool has_next() = 0;
 128   virtual GCPhase* next() = 0;
 129 };
 130 
 131 class GCTimer : public ResourceObj {

 132  protected:
 133   Ticks _gc_start;
 134   Ticks _gc_end;
 135   TimePartitions _time_partitions;
 136 
 137  public:
 138   virtual void register_gc_start(const Ticks& time = Ticks::now());
 139   virtual void register_gc_end(const Ticks& time = Ticks::now());
 140 
 141   void register_gc_phase_start(const char* name, const Ticks& time);
 142   void register_gc_phase_end(const Ticks& time);
 143 
 144   const Ticks gc_start() const { return _gc_start; }
 145   const Ticks gc_end() const { return _gc_end; }
 146 
 147   TimePartitions* time_partitions() { return &_time_partitions; }
 148 
 149  protected:
 150   void register_gc_pause_start(const char* name, const Ticks& time = Ticks::now());
 151   void register_gc_pause_end(const Ticks& time = Ticks::now());


< prev index next >