< prev index next >

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

Print this page




  39 template <class T> class WorkerDataArray;
  40 
  41 class G1GCPhaseTimes : public CHeapObj<mtGC> {
  42   uint _max_gc_threads;
  43   jlong _gc_start_counter;
  44   double _gc_pause_time_ms;
  45 
  46  public:
  47   enum GCParPhases {
  48     GCWorkerStart,
  49     ExtRootScan,
  50     ThreadRoots,
  51     UniverseRoots,
  52     JNIRoots,
  53     ObjectSynchronizerRoots,
  54     ManagementRoots,
  55     SystemDictionaryRoots,
  56     CLDGRoots,
  57     JVMTIRoots,
  58     AOT_ONLY(AOTCodeRoots COMMA)

  59     CMRefRoots,
  60     WaitForStrongCLD,
  61     WeakCLDRoots,
  62     MergeER,
  63     MergeRS,
  64     OptMergeRS,
  65     MergeLB,
  66     MergeHCC,
  67     ScanHR,
  68     OptScanHR,
  69     CodeRoots,
  70     OptCodeRoots,
  71     ObjCopy,
  72     OptObjCopy,
  73     Termination,
  74     OptTermination,
  75     Other,
  76     GCWorkerTotal,
  77     GCWorkerEnd,
  78     StringDedupQueueFixup,
  79     StringDedupTableFixup,
  80     RedirtyCards,
  81     YoungFreeCSet,
  82     NonYoungFreeCSet,
  83     GCParPhasesSentinel
  84   };
  85 
  86   static const GCParPhases ExtRootScanSubPhasesFirst = ThreadRoots;
  87   static const GCParPhases ExtRootScanSubPhasesLast = WeakCLDRoots;
  88 
  89   enum GCMergeRSWorkTimes {
  90     MergeRSMergedSparse,
  91     MergeRSMergedFine,
  92     MergeRSMergedCoarse


  93   };
  94 
  95   enum GCScanHRWorkItems {
  96     ScanHRScannedCards,
  97     ScanHRScannedBlocks,
  98     ScanHRClaimedChunks,
  99     ScanHRScannedOptRefs,
 100     ScanHRUsedMemory
 101   };
 102 
 103   enum GCMergeHCCWorkItems {
 104     MergeHCCDirtyCards,
 105     MergeHCCSkippedCards
 106   };
 107 
 108   enum GCMergeLBWorkItems {
 109     MergeLBDirtyCards,
 110     MergeLBSkippedCards
 111   };
 112 
 113   enum GCObjCopyWorkItems {
 114     ObjCopyLABWaste,
 115     ObjCopyLABUndoWaste
 116   };
 117 
 118  private:
 119   // Markers for grouping the phases in the GCPhases enum above
 120   static const int GCMainParPhasesLast = GCWorkerEnd;
 121 
 122   WorkerDataArray<double>* _gc_par_phases[GCParPhasesSentinel];
 123 
 124   WorkerDataArray<size_t>* _merge_rs_merged_sparse;
 125   WorkerDataArray<size_t>* _merge_rs_merged_fine;
 126   WorkerDataArray<size_t>* _merge_rs_merged_coarse;
 127 
 128   WorkerDataArray<size_t>* _merge_hcc_dirty_cards;
 129   WorkerDataArray<size_t>* _merge_hcc_skipped_cards;
 130 
 131   WorkerDataArray<size_t>* _merge_lb_dirty_cards;
 132   WorkerDataArray<size_t>* _merge_lb_skipped_cards;
 133 
 134   WorkerDataArray<size_t>* _scan_hr_scanned_cards;
 135   WorkerDataArray<size_t>* _scan_hr_scanned_blocks;
 136   WorkerDataArray<size_t>* _scan_hr_claimed_chunks;
 137 
 138   WorkerDataArray<size_t>* _opt_merge_rs_merged_sparse;
 139   WorkerDataArray<size_t>* _opt_merge_rs_merged_fine;
 140   WorkerDataArray<size_t>* _opt_merge_rs_merged_coarse;
 141 
 142   WorkerDataArray<size_t>* _opt_scan_hr_scanned_cards;
 143   WorkerDataArray<size_t>* _opt_scan_hr_scanned_blocks;
 144   WorkerDataArray<size_t>* _opt_scan_hr_claimed_chunks;
 145   WorkerDataArray<size_t>* _opt_scan_hr_scanned_opt_refs;
 146   WorkerDataArray<size_t>* _opt_scan_hr_used_memory;
 147 
 148   WorkerDataArray<size_t>* _obj_copy_lab_waste;
 149   WorkerDataArray<size_t>* _obj_copy_lab_undo_waste;
 150 
 151   WorkerDataArray<size_t>* _opt_obj_copy_lab_waste;
 152   WorkerDataArray<size_t>* _opt_obj_copy_lab_undo_waste;
 153 
 154   WorkerDataArray<size_t>* _termination_attempts;
 155 
 156   WorkerDataArray<size_t>* _opt_termination_attempts;
 157 
 158   WorkerDataArray<size_t>* _redirtied_cards;
 159 
 160   double _cur_collection_initial_evac_time_ms;
 161   double _cur_optional_evac_ms;
 162   double _cur_collection_code_root_fixup_time_ms;
 163   double _cur_strong_code_root_purge_time_ms;
 164 
 165   double _cur_evac_fail_recalc_used;
 166   double _cur_evac_fail_remove_self_forwards;
 167 
 168   double _cur_string_deduplication_time_ms;
 169 
 170   double _cur_merge_heap_roots_time_ms;
 171   double _cur_optional_merge_heap_roots_time_ms;
 172 
 173   double _cur_prepare_merge_heap_roots_time_ms;
 174   double _cur_optional_prepare_merge_heap_roots_time_ms;
 175 
 176   double _cur_prepare_tlab_time_ms;
 177   double _cur_resize_tlab_time_ms;
 178 
 179   double _cur_derived_pointer_table_update_time_ms;
 180 
 181   double _cur_clear_ct_time_ms;
 182   double _cur_expand_heap_time_ms;
 183   double _cur_ref_proc_time_ms;
 184 
 185   double _cur_collection_start_sec;
 186   double _root_region_scan_wait_time_ms;
 187 
 188   double _external_accounted_time_ms;
 189 
 190   double _recorded_prepare_heap_roots_time_ms;
 191 
 192   double _recorded_clear_claimed_marks_time_ms;
 193 
 194   double _recorded_young_cset_choice_time_ms;
 195   double _recorded_non_young_cset_choice_time_ms;
 196 
 197   double _recorded_redirty_logged_cards_time_ms;
 198 
 199   double _recorded_preserve_cm_referents_time_ms;
 200 
 201   double _recorded_merge_pss_time_ms;
 202 
 203   double _recorded_start_new_cset_time_ms;
 204 
 205   double _recorded_total_free_cset_time_ms;
 206 
 207   double _recorded_serial_free_cset_time_ms;
 208 
 209   double _cur_region_register_time;
 210 
 211   double _cur_fast_reclaim_humongous_time_ms;


 221 
 222   double worker_time(GCParPhases phase, uint worker);
 223   void note_gc_end();
 224   void reset();
 225 
 226   template <class T>
 227   void details(T* phase, const char* indent) const;
 228 
 229   void log_phase(WorkerDataArray<double>* phase, uint indent, outputStream* out, bool print_sum) const;
 230   void debug_phase(WorkerDataArray<double>* phase, uint extra_indent = 0) const;
 231   void trace_phase(WorkerDataArray<double>* phase, bool print_sum = true) const;
 232 
 233   void info_time(const char* name, double value) const;
 234   void debug_time(const char* name, double value) const;
 235   // This will print logs for both 'gc+phases' and 'gc+phases+ref'.
 236   void debug_time_for_reference(const char* name, double value) const;
 237   void trace_time(const char* name, double value) const;
 238   void trace_count(const char* name, size_t value) const;
 239 
 240   double print_pre_evacuate_collection_set() const;
 241   double print_merge_heap_roots_time() const;
 242   double print_evacuate_initial_collection_set() const;
 243   double print_evacuate_optional_collection_set() const;
 244   double print_post_evacuate_collection_set() const;
 245   void print_other(double accounted_ms) const;
 246 
 247  public:
 248   G1GCPhaseTimes(STWGCTimer* gc_timer, uint max_gc_threads);
 249   void note_gc_start();
 250   void print();
 251   static const char* phase_name(GCParPhases phase);
 252 
 253   // record the time a phase took in seconds
 254   void record_time_secs(GCParPhases phase, uint worker_i, double secs);
 255 
 256   // add a number of seconds to a phase
 257   void add_time_secs(GCParPhases phase, uint worker_i, double secs);
 258 
 259   void record_or_add_time_secs(GCParPhases phase, uint worker_i, double secs);
 260 
 261   double get_time_secs(GCParPhases phase, uint worker_i);
 262 


 292   void record_expand_heap_time(double ms) {
 293     _cur_expand_heap_time_ms = ms;
 294   }
 295 
 296   void record_initial_evac_time(double ms) {
 297     _cur_collection_initial_evac_time_ms = ms;
 298   }
 299 
 300   void record_or_add_optional_evac_time(double ms) {
 301     _cur_optional_evac_ms += ms;
 302   }
 303 
 304   void record_or_add_code_root_fixup_time(double ms) {
 305     _cur_collection_code_root_fixup_time_ms += ms;
 306   }
 307 
 308   void record_strong_code_root_purge_time(double ms) {
 309     _cur_strong_code_root_purge_time_ms = ms;
 310   }
 311 
 312   void record_merge_heap_roots_time(double ms) {
 313     _cur_merge_heap_roots_time_ms += ms;
 314   }
 315 
 316   void record_or_add_optional_merge_heap_roots_time(double ms) {
 317     _cur_optional_merge_heap_roots_time_ms += ms;
 318   }
 319 
 320   void record_prepare_merge_heap_roots_time(double ms) {
 321     _cur_prepare_merge_heap_roots_time_ms += ms;
 322   }
 323 
 324   void record_or_add_optional_prepare_merge_heap_roots_time(double ms) {
 325     _cur_optional_prepare_merge_heap_roots_time_ms += ms;
 326   }
 327 
 328   void record_evac_fail_recalc_used_time(double ms) {
 329     _cur_evac_fail_recalc_used = ms;
 330   }
 331 
 332   void record_evac_fail_remove_self_forwards(double ms) {
 333     _cur_evac_fail_remove_self_forwards = ms;
 334   }
 335 
 336   void record_string_deduplication_time(double ms) {
 337     _cur_string_deduplication_time_ms = ms;
 338   }
 339 
 340   void record_ref_proc_time(double ms) {
 341     _cur_ref_proc_time_ms = ms;
 342   }
 343 
 344   void record_root_region_scan_wait_time(double time_ms) {
 345     _root_region_scan_wait_time_ms = time_ms;
 346   }
 347 


 387   void record_start_new_cset_time_ms(double time_ms) {
 388     _recorded_start_new_cset_time_ms = time_ms;
 389   }
 390 
 391   void record_cur_collection_start_sec(double time_ms) {
 392     _cur_collection_start_sec = time_ms;
 393   }
 394 
 395   void record_verify_before_time_ms(double time_ms) {
 396     _cur_verify_before_time_ms = time_ms;
 397   }
 398 
 399   void record_verify_after_time_ms(double time_ms) {
 400     _cur_verify_after_time_ms = time_ms;
 401   }
 402 
 403   void inc_external_accounted_time_ms(double time_ms) {
 404     _external_accounted_time_ms += time_ms;
 405   }
 406 
 407   void record_prepare_heap_roots_time_ms(double recorded_prepare_heap_roots_time_ms) {
 408     _recorded_prepare_heap_roots_time_ms = recorded_prepare_heap_roots_time_ms;
 409   }
 410 
 411   void record_clear_claimed_marks_time_ms(double recorded_clear_claimed_marks_time_ms) {
 412     _recorded_clear_claimed_marks_time_ms = recorded_clear_claimed_marks_time_ms;
 413   }
 414 
 415   double cur_collection_start_sec() {
 416     return _cur_collection_start_sec;
 417   }
 418 
 419   double cur_collection_par_time_ms() {
 420     return _cur_collection_initial_evac_time_ms;
 421   }
 422 
 423   double cur_clear_ct_time_ms() {
 424     return _cur_clear_ct_time_ms;
 425   }
 426 
 427   double cur_expand_heap_time_ms() {
 428     return _cur_expand_heap_time_ms;
 429   }
 430 
 431   double root_region_scan_wait_time_ms() {
 432     return _root_region_scan_wait_time_ms;
 433   }
 434 
 435   double young_cset_choice_time_ms() {
 436     return _recorded_young_cset_choice_time_ms;
 437   }
 438 
 439   double total_free_cset_time_ms() {
 440     return _recorded_total_free_cset_time_ms;
 441   }
 442 
 443   double non_young_cset_choice_time_ms() {
 444     return _recorded_non_young_cset_choice_time_ms;
 445   }
 446 
 447   double fast_reclaim_humongous_time_ms() {
 448     return _cur_fast_reclaim_humongous_time_ms;
 449   }
 450 
 451   size_t fast_reclaim_humongous_candidates() const {
 452     return _cur_fast_reclaim_humongous_candidates;
 453   }
 454 
 455   ReferenceProcessorPhaseTimes* ref_phase_times() { return &_ref_phase_times; }
 456 
 457   WeakProcessorPhaseTimes* weak_phase_times() { return &_weak_phase_times; }
 458 };
 459 
 460 class G1EvacPhaseWithTrimTimeTracker : public StackObj {
 461   G1ParScanThreadState* _pss;
 462   Ticks _start;
 463 
 464   Tickspan& _total_time;
 465   Tickspan& _trim_time;
 466 
 467   bool _stopped;
 468 public:
 469   G1EvacPhaseWithTrimTimeTracker(G1ParScanThreadState* pss, Tickspan& total_time, Tickspan& trim_time);
 470   ~G1EvacPhaseWithTrimTimeTracker();
 471 
 472   void stop();
 473 };
 474 
 475 class G1GCParPhaseTimesTracker : public CHeapObj<mtGC> {
 476 protected:
 477   Ticks _start_time;
 478   G1GCPhaseTimes::GCParPhases _phase;
 479   G1GCPhaseTimes* _phase_times;
 480   uint _worker_id;
 481   EventGCPhaseParallel _event;
 482   bool _must_record;
 483 
 484 public:
 485   G1GCParPhaseTimesTracker(G1GCPhaseTimes* phase_times, G1GCPhaseTimes::GCParPhases phase, uint worker_id, bool must_record = true);
 486   virtual ~G1GCParPhaseTimesTracker();
 487 };
 488 
 489 class G1EvacPhaseTimesTracker : public G1GCParPhaseTimesTracker {
 490   Tickspan _total_time;
 491   Tickspan _trim_time;
 492 
 493   G1EvacPhaseWithTrimTimeTracker _trim_tracker;
 494 public:
 495   G1EvacPhaseTimesTracker(G1GCPhaseTimes* phase_times, G1ParScanThreadState* pss, G1GCPhaseTimes::GCParPhases phase, uint worker_id);
 496   virtual ~G1EvacPhaseTimesTracker();
 497 };
 498 
 499 #endif // SHARE_GC_G1_G1GCPHASETIMES_HPP


  39 template <class T> class WorkerDataArray;
  40 
  41 class G1GCPhaseTimes : public CHeapObj<mtGC> {
  42   uint _max_gc_threads;
  43   jlong _gc_start_counter;
  44   double _gc_pause_time_ms;
  45 
  46  public:
  47   enum GCParPhases {
  48     GCWorkerStart,
  49     ExtRootScan,
  50     ThreadRoots,
  51     UniverseRoots,
  52     JNIRoots,
  53     ObjectSynchronizerRoots,
  54     ManagementRoots,
  55     SystemDictionaryRoots,
  56     CLDGRoots,
  57     JVMTIRoots,
  58     AOT_ONLY(AOTCodeRoots COMMA)
  59     JVMCI_ONLY(JVMCIRoots COMMA)
  60     CMRefRoots,
  61     WaitForStrongCLD,
  62     WeakCLDRoots,
  63     UpdateRS,
  64     ScanHCC,
  65     ScanRS,
  66     OptScanRS,



  67     CodeRoots,
  68     OptCodeRoots,
  69     ObjCopy,
  70     OptObjCopy,
  71     Termination,
  72     OptTermination,
  73     Other,
  74     GCWorkerTotal,
  75     GCWorkerEnd,
  76     StringDedupQueueFixup,
  77     StringDedupTableFixup,
  78     RedirtyCards,
  79     YoungFreeCSet,
  80     NonYoungFreeCSet,
  81     GCParPhasesSentinel
  82   };
  83 
  84   static const GCParPhases ExtRootScanSubPhasesFirst = ThreadRoots;
  85   static const GCParPhases ExtRootScanSubPhasesLast = WeakCLDRoots;
  86 
  87   enum GCScanRSWorkItems {
  88     ScanRSScannedCards,
  89     ScanRSClaimedCards,
  90     ScanRSSkippedCards,
  91     ScanRSScannedOptRefs,
  92     ScanRSUsedMemory
  93   };
  94 
  95   enum GCUpdateRSWorkItems {
  96     UpdateRSProcessedBuffers,
  97     UpdateRSScannedCards,
  98     UpdateRSSkippedCards












  99   };
 100 
 101   enum GCObjCopyWorkItems {
 102     ObjCopyLABWaste,
 103     ObjCopyLABUndoWaste
 104   };
 105 
 106  private:
 107   // Markers for grouping the phases in the GCPhases enum above
 108   static const int GCMainParPhasesLast = GCWorkerEnd;
 109 
 110   WorkerDataArray<double>* _gc_par_phases[GCParPhasesSentinel];
 111 
 112   WorkerDataArray<size_t>* _update_rs_processed_buffers;
 113   WorkerDataArray<size_t>* _update_rs_scanned_cards;
 114   WorkerDataArray<size_t>* _update_rs_skipped_cards;
 115 
 116   WorkerDataArray<size_t>* _scan_rs_scanned_cards;
 117   WorkerDataArray<size_t>* _scan_rs_claimed_cards;
 118   WorkerDataArray<size_t>* _scan_rs_skipped_cards;
 119 
 120   WorkerDataArray<size_t>* _opt_scan_rs_scanned_cards;
 121   WorkerDataArray<size_t>* _opt_scan_rs_claimed_cards;
 122   WorkerDataArray<size_t>* _opt_scan_rs_skipped_cards;
 123   WorkerDataArray<size_t>* _opt_scan_rs_scanned_opt_refs;
 124   WorkerDataArray<size_t>* _opt_scan_rs_used_memory;










 125 
 126   WorkerDataArray<size_t>* _obj_copy_lab_waste;
 127   WorkerDataArray<size_t>* _obj_copy_lab_undo_waste;
 128 
 129   WorkerDataArray<size_t>* _opt_obj_copy_lab_waste;
 130   WorkerDataArray<size_t>* _opt_obj_copy_lab_undo_waste;
 131 
 132   WorkerDataArray<size_t>* _termination_attempts;
 133 
 134   WorkerDataArray<size_t>* _opt_termination_attempts;
 135 
 136   WorkerDataArray<size_t>* _redirtied_cards;
 137 
 138   double _cur_collection_initial_evac_time_ms;
 139   double _cur_optional_evac_ms;
 140   double _cur_collection_code_root_fixup_time_ms;
 141   double _cur_strong_code_root_purge_time_ms;
 142 
 143   double _cur_evac_fail_recalc_used;
 144   double _cur_evac_fail_remove_self_forwards;
 145 
 146   double _cur_string_deduplication_time_ms;
 147 






 148   double _cur_prepare_tlab_time_ms;
 149   double _cur_resize_tlab_time_ms;
 150 
 151   double _cur_derived_pointer_table_update_time_ms;
 152 
 153   double _cur_clear_ct_time_ms;
 154   double _cur_expand_heap_time_ms;
 155   double _cur_ref_proc_time_ms;
 156 
 157   double _cur_collection_start_sec;
 158   double _root_region_scan_wait_time_ms;
 159 
 160   double _external_accounted_time_ms;
 161 


 162   double _recorded_clear_claimed_marks_time_ms;
 163 
 164   double _recorded_young_cset_choice_time_ms;
 165   double _recorded_non_young_cset_choice_time_ms;
 166 
 167   double _recorded_redirty_logged_cards_time_ms;
 168 
 169   double _recorded_preserve_cm_referents_time_ms;
 170 
 171   double _recorded_merge_pss_time_ms;
 172 
 173   double _recorded_start_new_cset_time_ms;
 174 
 175   double _recorded_total_free_cset_time_ms;
 176 
 177   double _recorded_serial_free_cset_time_ms;
 178 
 179   double _cur_region_register_time;
 180 
 181   double _cur_fast_reclaim_humongous_time_ms;


 191 
 192   double worker_time(GCParPhases phase, uint worker);
 193   void note_gc_end();
 194   void reset();
 195 
 196   template <class T>
 197   void details(T* phase, const char* indent) const;
 198 
 199   void log_phase(WorkerDataArray<double>* phase, uint indent, outputStream* out, bool print_sum) const;
 200   void debug_phase(WorkerDataArray<double>* phase, uint extra_indent = 0) const;
 201   void trace_phase(WorkerDataArray<double>* phase, bool print_sum = true) const;
 202 
 203   void info_time(const char* name, double value) const;
 204   void debug_time(const char* name, double value) const;
 205   // This will print logs for both 'gc+phases' and 'gc+phases+ref'.
 206   void debug_time_for_reference(const char* name, double value) const;
 207   void trace_time(const char* name, double value) const;
 208   void trace_count(const char* name, size_t value) const;
 209 
 210   double print_pre_evacuate_collection_set() const;
 211   double print_evacuate_collection_set() const;

 212   double print_evacuate_optional_collection_set() const;
 213   double print_post_evacuate_collection_set() const;
 214   void print_other(double accounted_ms) const;
 215 
 216  public:
 217   G1GCPhaseTimes(STWGCTimer* gc_timer, uint max_gc_threads);
 218   void note_gc_start();
 219   void print();
 220   static const char* phase_name(GCParPhases phase);
 221 
 222   // record the time a phase took in seconds
 223   void record_time_secs(GCParPhases phase, uint worker_i, double secs);
 224 
 225   // add a number of seconds to a phase
 226   void add_time_secs(GCParPhases phase, uint worker_i, double secs);
 227 
 228   void record_or_add_time_secs(GCParPhases phase, uint worker_i, double secs);
 229 
 230   double get_time_secs(GCParPhases phase, uint worker_i);
 231 


 261   void record_expand_heap_time(double ms) {
 262     _cur_expand_heap_time_ms = ms;
 263   }
 264 
 265   void record_initial_evac_time(double ms) {
 266     _cur_collection_initial_evac_time_ms = ms;
 267   }
 268 
 269   void record_or_add_optional_evac_time(double ms) {
 270     _cur_optional_evac_ms += ms;
 271   }
 272 
 273   void record_or_add_code_root_fixup_time(double ms) {
 274     _cur_collection_code_root_fixup_time_ms += ms;
 275   }
 276 
 277   void record_strong_code_root_purge_time(double ms) {
 278     _cur_strong_code_root_purge_time_ms = ms;
 279   }
 280 
















 281   void record_evac_fail_recalc_used_time(double ms) {
 282     _cur_evac_fail_recalc_used = ms;
 283   }
 284 
 285   void record_evac_fail_remove_self_forwards(double ms) {
 286     _cur_evac_fail_remove_self_forwards = ms;
 287   }
 288 
 289   void record_string_deduplication_time(double ms) {
 290     _cur_string_deduplication_time_ms = ms;
 291   }
 292 
 293   void record_ref_proc_time(double ms) {
 294     _cur_ref_proc_time_ms = ms;
 295   }
 296 
 297   void record_root_region_scan_wait_time(double time_ms) {
 298     _root_region_scan_wait_time_ms = time_ms;
 299   }
 300 


 340   void record_start_new_cset_time_ms(double time_ms) {
 341     _recorded_start_new_cset_time_ms = time_ms;
 342   }
 343 
 344   void record_cur_collection_start_sec(double time_ms) {
 345     _cur_collection_start_sec = time_ms;
 346   }
 347 
 348   void record_verify_before_time_ms(double time_ms) {
 349     _cur_verify_before_time_ms = time_ms;
 350   }
 351 
 352   void record_verify_after_time_ms(double time_ms) {
 353     _cur_verify_after_time_ms = time_ms;
 354   }
 355 
 356   void inc_external_accounted_time_ms(double time_ms) {
 357     _external_accounted_time_ms += time_ms;
 358   }
 359 




 360   void record_clear_claimed_marks_time_ms(double recorded_clear_claimed_marks_time_ms) {
 361     _recorded_clear_claimed_marks_time_ms = recorded_clear_claimed_marks_time_ms;
 362   }
 363 
 364   double cur_collection_start_sec() {
 365     return _cur_collection_start_sec;
 366   }
 367 
 368   double cur_collection_par_time_ms() {
 369     return _cur_collection_initial_evac_time_ms;
 370   }
 371 
 372   double cur_clear_ct_time_ms() {
 373     return _cur_clear_ct_time_ms;
 374   }
 375 
 376   double cur_expand_heap_time_ms() {
 377     return _cur_expand_heap_time_ms;
 378   }
 379 
 380   double root_region_scan_wait_time_ms() {
 381     return _root_region_scan_wait_time_ms;
 382   }
 383 
 384   double young_cset_choice_time_ms() {
 385     return _recorded_young_cset_choice_time_ms;
 386   }
 387 
 388   double total_free_cset_time_ms() {
 389     return _recorded_total_free_cset_time_ms;
 390   }
 391 
 392   double non_young_cset_choice_time_ms() {
 393     return _recorded_non_young_cset_choice_time_ms;
 394   }
 395 
 396   double fast_reclaim_humongous_time_ms() {
 397     return _cur_fast_reclaim_humongous_time_ms;
 398   }
 399 




 400   ReferenceProcessorPhaseTimes* ref_phase_times() { return &_ref_phase_times; }
 401 
 402   WeakProcessorPhaseTimes* weak_phase_times() { return &_weak_phase_times; }
 403 };
 404 
 405 class G1EvacPhaseWithTrimTimeTracker : public StackObj {
 406   G1ParScanThreadState* _pss;
 407   Ticks _start;
 408 
 409   Tickspan& _total_time;
 410   Tickspan& _trim_time;
 411 
 412   bool _stopped;
 413 public:
 414   G1EvacPhaseWithTrimTimeTracker(G1ParScanThreadState* pss, Tickspan& total_time, Tickspan& trim_time);
 415   ~G1EvacPhaseWithTrimTimeTracker();
 416 
 417   void stop();
 418 };
 419 
 420 class G1GCParPhaseTimesTracker : public CHeapObj<mtGC> {
 421 protected:
 422   Ticks _start_time;
 423   G1GCPhaseTimes::GCParPhases _phase;
 424   G1GCPhaseTimes* _phase_times;
 425   uint _worker_id;
 426   EventGCPhaseParallel _event;


 427 public:
 428   G1GCParPhaseTimesTracker(G1GCPhaseTimes* phase_times, G1GCPhaseTimes::GCParPhases phase, uint worker_id);
 429   virtual ~G1GCParPhaseTimesTracker();
 430 };
 431 
 432 class G1EvacPhaseTimesTracker : public G1GCParPhaseTimesTracker {
 433   Tickspan _total_time;
 434   Tickspan _trim_time;
 435 
 436   G1EvacPhaseWithTrimTimeTracker _trim_tracker;
 437 public:
 438   G1EvacPhaseTimesTracker(G1GCPhaseTimes* phase_times, G1ParScanThreadState* pss, G1GCPhaseTimes::GCParPhases phase, uint worker_id);
 439   virtual ~G1EvacPhaseTimesTracker();
 440 };
 441 
 442 #endif // SHARE_GC_G1_G1GCPHASETIMES_HPP
< prev index next >