< prev index next >

src/share/vm/gc/g1/g1GCPhaseTimes.hpp

Print this page




  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #ifndef SHARE_VM_GC_G1_G1GCPHASETIMES_HPP
  26 #define SHARE_VM_GC_G1_G1GCPHASETIMES_HPP
  27 
  28 #include "memory/allocation.hpp"
  29 
  30 class LineBuffer;
  31 
  32 template <class T> class WorkerDataArray;
  33 
  34 class G1GCPhaseTimes : public CHeapObj<mtGC> {
  35   friend class G1GCParPhasePrinter;
  36 
  37   uint _active_gc_threads;
  38   uint _max_gc_threads;


  39 
  40  public:
  41   enum GCParPhases {
  42     GCWorkerStart,
  43     ExtRootScan,
  44     ThreadRoots,
  45     StringTableRoots,
  46     UniverseRoots,
  47     JNIRoots,
  48     ObjectSynchronizerRoots,
  49     FlatProfilerRoots,
  50     ManagementRoots,
  51     SystemDictionaryRoots,
  52     CLDGRoots,
  53     JVMTIRoots,
  54     CMRefRoots,
  55     WaitForStrongCLD,
  56     WeakCLDRoots,
  57     SATBFiltering,
  58     UpdateRS,


 109   double _recorded_young_free_cset_time_ms;
 110   double _recorded_non_young_free_cset_time_ms;
 111 
 112   double _cur_fast_reclaim_humongous_time_ms;
 113   double _cur_fast_reclaim_humongous_register_time_ms;
 114   size_t _cur_fast_reclaim_humongous_total;
 115   size_t _cur_fast_reclaim_humongous_candidates;
 116   size_t _cur_fast_reclaim_humongous_reclaimed;
 117 
 118   double _cur_verify_before_time_ms;
 119   double _cur_verify_after_time_ms;
 120 
 121   // Helper methods for detailed logging
 122   void print_stats(const char*, const char* str, double value);
 123 
 124   void note_gc_end();
 125 
 126  public:
 127   G1GCPhaseTimes(uint max_gc_threads);
 128   void note_gc_start(uint active_gc_threads);
 129   void print(double pause_time_ms);
 130 
 131   // record the time a phase took in seconds
 132   void record_time_secs(GCParPhases phase, uint worker_i, double secs);
 133 
 134   // add a number of seconds to a phase
 135   void add_time_secs(GCParPhases phase, uint worker_i, double secs);
 136 
 137   void record_thread_work_item(GCParPhases phase, uint worker_i, size_t count);
 138 
 139   // return the average time for a phase in milliseconds
 140   double average_time_ms(GCParPhases phase);
 141 
 142   size_t sum_thread_work_items(GCParPhases phase);
 143 
 144  private:
 145   double get_time_ms(GCParPhases phase, uint worker_i);
 146   double sum_time_ms(GCParPhases phase);
 147   double min_time_ms(GCParPhases phase);
 148   double max_time_ms(GCParPhases phase);
 149   size_t get_thread_work_item(GCParPhases phase, uint worker_i);




  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #ifndef SHARE_VM_GC_G1_G1GCPHASETIMES_HPP
  26 #define SHARE_VM_GC_G1_G1GCPHASETIMES_HPP
  27 
  28 #include "memory/allocation.hpp"
  29 
  30 class LineBuffer;
  31 
  32 template <class T> class WorkerDataArray;
  33 
  34 class G1GCPhaseTimes : public CHeapObj<mtGC> {
  35   friend class G1GCParPhasePrinter;
  36 
  37   uint _active_gc_threads;
  38   uint _max_gc_threads;
  39   jlong _gc_start_counter;
  40   double _gc_pause_time_ms;
  41 
  42  public:
  43   enum GCParPhases {
  44     GCWorkerStart,
  45     ExtRootScan,
  46     ThreadRoots,
  47     StringTableRoots,
  48     UniverseRoots,
  49     JNIRoots,
  50     ObjectSynchronizerRoots,
  51     FlatProfilerRoots,
  52     ManagementRoots,
  53     SystemDictionaryRoots,
  54     CLDGRoots,
  55     JVMTIRoots,
  56     CMRefRoots,
  57     WaitForStrongCLD,
  58     WeakCLDRoots,
  59     SATBFiltering,
  60     UpdateRS,


 111   double _recorded_young_free_cset_time_ms;
 112   double _recorded_non_young_free_cset_time_ms;
 113 
 114   double _cur_fast_reclaim_humongous_time_ms;
 115   double _cur_fast_reclaim_humongous_register_time_ms;
 116   size_t _cur_fast_reclaim_humongous_total;
 117   size_t _cur_fast_reclaim_humongous_candidates;
 118   size_t _cur_fast_reclaim_humongous_reclaimed;
 119 
 120   double _cur_verify_before_time_ms;
 121   double _cur_verify_after_time_ms;
 122 
 123   // Helper methods for detailed logging
 124   void print_stats(const char*, const char* str, double value);
 125 
 126   void note_gc_end();
 127 
 128  public:
 129   G1GCPhaseTimes(uint max_gc_threads);
 130   void note_gc_start(uint active_gc_threads);
 131   void print();
 132 
 133   // record the time a phase took in seconds
 134   void record_time_secs(GCParPhases phase, uint worker_i, double secs);
 135 
 136   // add a number of seconds to a phase
 137   void add_time_secs(GCParPhases phase, uint worker_i, double secs);
 138 
 139   void record_thread_work_item(GCParPhases phase, uint worker_i, size_t count);
 140 
 141   // return the average time for a phase in milliseconds
 142   double average_time_ms(GCParPhases phase);
 143 
 144   size_t sum_thread_work_items(GCParPhases phase);
 145 
 146  private:
 147   double get_time_ms(GCParPhases phase, uint worker_i);
 148   double sum_time_ms(GCParPhases phase);
 149   double min_time_ms(GCParPhases phase);
 150   double max_time_ms(GCParPhases phase);
 151   size_t get_thread_work_item(GCParPhases phase, uint worker_i);


< prev index next >