< prev index next >

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

Print this page
rev 12944 : imported patch 8178148-more-detailed-scan-rs-logging


  59     ScanHCC,
  60     ScanRS,
  61     CodeRoots,
  62 #if INCLUDE_AOT
  63     AOTCodeRoots,
  64 #endif
  65     ObjCopy,
  66     Termination,
  67     Other,
  68     GCWorkerTotal,
  69     GCWorkerEnd,
  70     StringDedupQueueFixup,
  71     StringDedupTableFixup,
  72     RedirtyCards,
  73     PreserveCMReferents,
  74     YoungFreeCSet,
  75     NonYoungFreeCSet,
  76     GCParPhasesSentinel
  77   };
  78 





  79  private:
  80   // Markers for grouping the phases in the GCPhases enum above
  81   static const int GCMainParPhasesLast = GCWorkerEnd;
  82   static const int StringDedupPhasesFirst = StringDedupQueueFixup;
  83   static const int StringDedupPhasesLast = StringDedupTableFixup;
  84 
  85   WorkerDataArray<double>* _gc_par_phases[GCParPhasesSentinel];

  86   WorkerDataArray<size_t>* _update_rs_processed_buffers;





  87   WorkerDataArray<size_t>* _termination_attempts;

  88   WorkerDataArray<size_t>* _redirtied_cards;
  89 
  90   double _cur_collection_par_time_ms;
  91   double _cur_collection_code_root_fixup_time_ms;
  92   double _cur_strong_code_root_purge_time_ms;
  93 
  94   double _cur_evac_fail_recalc_used;
  95   double _cur_evac_fail_restore_remsets;
  96   double _cur_evac_fail_remove_self_forwards;
  97 
  98   double _cur_string_dedup_fixup_time_ms;
  99 
 100   double _cur_prepare_tlab_time_ms;
 101   double _cur_resize_tlab_time_ms;
 102 
 103   double _cur_derived_pointer_table_update_time_ms;
 104 
 105   double _cur_clear_ct_time_ms;
 106   double _cur_expand_heap_time_ms;
 107   double _cur_ref_proc_time_ms;


 153   void debug_time(const char* name, double value) const;
 154   void trace_time(const char* name, double value) const;
 155   void trace_count(const char* name, size_t value) const;
 156 
 157   double print_pre_evacuate_collection_set() const;
 158   double print_evacuate_collection_set() const;
 159   double print_post_evacuate_collection_set() const;
 160   void print_other(double accounted_ms) const;
 161 
 162  public:
 163   G1GCPhaseTimes(uint max_gc_threads);
 164   void note_gc_start();
 165   void print();
 166 
 167   // record the time a phase took in seconds
 168   void record_time_secs(GCParPhases phase, uint worker_i, double secs);
 169 
 170   // add a number of seconds to a phase
 171   void add_time_secs(GCParPhases phase, uint worker_i, double secs);
 172 
 173   void record_thread_work_item(GCParPhases phase, uint worker_i, size_t count);
 174 
 175   // return the average time for a phase in milliseconds
 176   double average_time_ms(GCParPhases phase);
 177 
 178   size_t sum_thread_work_items(GCParPhases phase);
 179 
 180  public:
 181 
 182   void record_prepare_tlab_time_ms(double ms) {
 183     _cur_prepare_tlab_time_ms = ms;
 184   }
 185 
 186   void record_resize_tlab_time_ms(double ms) {
 187     _cur_resize_tlab_time_ms = ms;
 188   }
 189 
 190   void record_derived_pointer_table_update_time(double ms) {
 191     _cur_derived_pointer_table_update_time_ms = ms;
 192   }
 193 
 194   void record_clear_ct_time(double ms) {
 195     _cur_clear_ct_time_ms = ms;
 196   }
 197 
 198   void record_expand_heap_time(double ms) {




  59     ScanHCC,
  60     ScanRS,
  61     CodeRoots,
  62 #if INCLUDE_AOT
  63     AOTCodeRoots,
  64 #endif
  65     ObjCopy,
  66     Termination,
  67     Other,
  68     GCWorkerTotal,
  69     GCWorkerEnd,
  70     StringDedupQueueFixup,
  71     StringDedupTableFixup,
  72     RedirtyCards,
  73     PreserveCMReferents,
  74     YoungFreeCSet,
  75     NonYoungFreeCSet,
  76     GCParPhasesSentinel
  77   };
  78 
  79   enum GCScanRSWorkItems {
  80     ScannedCards,
  81     ClaimedCards,
  82     SkippedCards
  83   };
  84  private:
  85   // Markers for grouping the phases in the GCPhases enum above
  86   static const int GCMainParPhasesLast = GCWorkerEnd;
  87   static const int StringDedupPhasesFirst = StringDedupQueueFixup;
  88   static const int StringDedupPhasesLast = StringDedupTableFixup;
  89 
  90   WorkerDataArray<double>* _gc_par_phases[GCParPhasesSentinel];
  91 
  92   WorkerDataArray<size_t>* _update_rs_processed_buffers;
  93 
  94   WorkerDataArray<size_t>* _scan_rs_scanned_cards;
  95   WorkerDataArray<size_t>* _scan_rs_claimed_cards;
  96   WorkerDataArray<size_t>* _scan_rs_skipped_cards;
  97 
  98   WorkerDataArray<size_t>* _termination_attempts;
  99 
 100   WorkerDataArray<size_t>* _redirtied_cards;
 101 
 102   double _cur_collection_par_time_ms;
 103   double _cur_collection_code_root_fixup_time_ms;
 104   double _cur_strong_code_root_purge_time_ms;
 105 
 106   double _cur_evac_fail_recalc_used;
 107   double _cur_evac_fail_restore_remsets;
 108   double _cur_evac_fail_remove_self_forwards;
 109 
 110   double _cur_string_dedup_fixup_time_ms;
 111 
 112   double _cur_prepare_tlab_time_ms;
 113   double _cur_resize_tlab_time_ms;
 114 
 115   double _cur_derived_pointer_table_update_time_ms;
 116 
 117   double _cur_clear_ct_time_ms;
 118   double _cur_expand_heap_time_ms;
 119   double _cur_ref_proc_time_ms;


 165   void debug_time(const char* name, double value) const;
 166   void trace_time(const char* name, double value) const;
 167   void trace_count(const char* name, size_t value) const;
 168 
 169   double print_pre_evacuate_collection_set() const;
 170   double print_evacuate_collection_set() const;
 171   double print_post_evacuate_collection_set() const;
 172   void print_other(double accounted_ms) const;
 173 
 174  public:
 175   G1GCPhaseTimes(uint max_gc_threads);
 176   void note_gc_start();
 177   void print();
 178 
 179   // record the time a phase took in seconds
 180   void record_time_secs(GCParPhases phase, uint worker_i, double secs);
 181 
 182   // add a number of seconds to a phase
 183   void add_time_secs(GCParPhases phase, uint worker_i, double secs);
 184 
 185   void record_thread_work_item(GCParPhases phase, uint worker_i, size_t count, uint index = 0);
 186 
 187   // return the average time for a phase in milliseconds
 188   double average_time_ms(GCParPhases phase);
 189 
 190   size_t sum_thread_work_items(GCParPhases phase, uint index = 0);
 191 
 192  public:
 193 
 194   void record_prepare_tlab_time_ms(double ms) {
 195     _cur_prepare_tlab_time_ms = ms;
 196   }
 197 
 198   void record_resize_tlab_time_ms(double ms) {
 199     _cur_resize_tlab_time_ms = ms;
 200   }
 201 
 202   void record_derived_pointer_table_update_time(double ms) {
 203     _cur_derived_pointer_table_update_time_ms = ms;
 204   }
 205 
 206   void record_clear_ct_time(double ms) {
 207     _cur_clear_ct_time_ms = ms;
 208   }
 209 
 210   void record_expand_heap_time(double ms) {


< prev index next >