< prev index next >

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

Print this page
rev 49681 : imported patch 6672778-partial-queue-trimming
rev 49682 : imported patch 6672778-refactoring
rev 49683 : imported patch 6672778-stefanj-review
rev 49684 : imported patch 6672778-inconsistent-time-fixes
rev 49691 : [mq]: 8201596-weak-processing-missing


 115 
 116   _gc_par_phases[PreserveCMReferents] = new WorkerDataArray<double>(max_gc_threads, "Parallel Preserve CM Refs (ms):");
 117 
 118   reset();
 119 }
 120 
 121 void G1GCPhaseTimes::reset() {
 122   _cur_collection_par_time_ms = 0.0;
 123   _cur_collection_code_root_fixup_time_ms = 0.0;
 124   _cur_strong_code_root_purge_time_ms = 0.0;
 125   _cur_evac_fail_recalc_used = 0.0;
 126   _cur_evac_fail_remove_self_forwards = 0.0;
 127   _cur_string_dedup_fixup_time_ms = 0.0;
 128   _cur_prepare_tlab_time_ms = 0.0;
 129   _cur_resize_tlab_time_ms = 0.0;
 130   _cur_derived_pointer_table_update_time_ms = 0.0;
 131   _cur_clear_ct_time_ms = 0.0;
 132   _cur_expand_heap_time_ms = 0.0;
 133   _cur_ref_proc_time_ms = 0.0;
 134   _cur_ref_enq_time_ms = 0.0;

 135   _cur_collection_start_sec = 0.0;
 136   _root_region_scan_wait_time_ms = 0.0;
 137   _external_accounted_time_ms = 0.0;
 138   _recorded_clear_claimed_marks_time_ms = 0.0;
 139   _recorded_young_cset_choice_time_ms = 0.0;
 140   _recorded_non_young_cset_choice_time_ms = 0.0;
 141   _recorded_redirty_logged_cards_time_ms = 0.0;
 142   _recorded_preserve_cm_referents_time_ms = 0.0;
 143   _recorded_merge_pss_time_ms = 0.0;
 144   _recorded_start_new_cset_time_ms = 0.0;
 145   _recorded_total_free_cset_time_ms = 0.0;
 146   _recorded_serial_free_cset_time_ms = 0.0;
 147   _cur_fast_reclaim_humongous_time_ms = 0.0;
 148   _cur_fast_reclaim_humongous_register_time_ms = 0.0;
 149   _cur_fast_reclaim_humongous_total = 0;
 150   _cur_fast_reclaim_humongous_candidates = 0;
 151   _cur_fast_reclaim_humongous_reclaimed = 0;
 152   _cur_verify_before_time_ms = 0.0;
 153   _cur_verify_after_time_ms = 0.0;
 154 


 369   debug_phase(_gc_par_phases[CodeRoots]);
 370 #if INCLUDE_AOT
 371   debug_phase(_gc_par_phases[AOTCodeRoots]);
 372 #endif
 373   debug_phase(_gc_par_phases[ObjCopy]);
 374   debug_phase(_gc_par_phases[Termination]);
 375   debug_phase(_gc_par_phases[Other]);
 376   debug_phase(_gc_par_phases[GCWorkerTotal]);
 377   trace_phase(_gc_par_phases[GCWorkerEnd], false);
 378 
 379   return sum_ms;
 380 }
 381 
 382 double G1GCPhaseTimes::print_post_evacuate_collection_set() const {
 383   const double evac_fail_handling = _cur_evac_fail_recalc_used +
 384                                     _cur_evac_fail_remove_self_forwards;
 385   const double sum_ms = evac_fail_handling +
 386                         _cur_collection_code_root_fixup_time_ms +
 387                         _recorded_preserve_cm_referents_time_ms +
 388                         _cur_ref_proc_time_ms +

 389                         _cur_ref_enq_time_ms +
 390                         _cur_clear_ct_time_ms +
 391                         _recorded_merge_pss_time_ms +
 392                         _cur_strong_code_root_purge_time_ms +
 393                         _recorded_redirty_logged_cards_time_ms +
 394                         _recorded_total_free_cset_time_ms +
 395                         _cur_fast_reclaim_humongous_time_ms +
 396                         _cur_expand_heap_time_ms +
 397                         _cur_string_dedup_fixup_time_ms;
 398 
 399   info_time("Post Evacuate Collection Set", sum_ms);
 400 
 401   debug_time("Code Roots Fixup", _cur_collection_code_root_fixup_time_ms);
 402 
 403   debug_time("Preserve CM Refs", _recorded_preserve_cm_referents_time_ms);
 404   trace_phase(_gc_par_phases[PreserveCMReferents]);
 405 
 406   debug_time_for_reference("Reference Processing", _cur_ref_proc_time_ms);
 407   _ref_phase_times.print_all_references(2, false);


 408 
 409   if (G1StringDedup::is_enabled()) {
 410     debug_time("String Dedup Fixup", _cur_string_dedup_fixup_time_ms);
 411     debug_phase(_gc_par_phases[StringDedupQueueFixup]);
 412     debug_phase(_gc_par_phases[StringDedupTableFixup]);
 413   }
 414 
 415   debug_time("Clear Card Table", _cur_clear_ct_time_ms);
 416 
 417   if (G1CollectedHeap::heap()->evacuation_failed()) {
 418     debug_time("Evacuation Failure", evac_fail_handling);
 419     trace_time("Recalculate Used", _cur_evac_fail_recalc_used);
 420     trace_time("Remove Self Forwards",_cur_evac_fail_remove_self_forwards);
 421   }
 422 
 423   debug_time_for_reference("Reference Enqueuing", _cur_ref_enq_time_ms);
 424   _ref_phase_times.print_enqueue_phase(2, false);
 425 
 426   debug_time("Merge Per-Thread State", _recorded_merge_pss_time_ms);
 427   debug_time("Code Roots Purge", _cur_strong_code_root_purge_time_ms);




 115 
 116   _gc_par_phases[PreserveCMReferents] = new WorkerDataArray<double>(max_gc_threads, "Parallel Preserve CM Refs (ms):");
 117 
 118   reset();
 119 }
 120 
 121 void G1GCPhaseTimes::reset() {
 122   _cur_collection_par_time_ms = 0.0;
 123   _cur_collection_code_root_fixup_time_ms = 0.0;
 124   _cur_strong_code_root_purge_time_ms = 0.0;
 125   _cur_evac_fail_recalc_used = 0.0;
 126   _cur_evac_fail_remove_self_forwards = 0.0;
 127   _cur_string_dedup_fixup_time_ms = 0.0;
 128   _cur_prepare_tlab_time_ms = 0.0;
 129   _cur_resize_tlab_time_ms = 0.0;
 130   _cur_derived_pointer_table_update_time_ms = 0.0;
 131   _cur_clear_ct_time_ms = 0.0;
 132   _cur_expand_heap_time_ms = 0.0;
 133   _cur_ref_proc_time_ms = 0.0;
 134   _cur_ref_enq_time_ms = 0.0;
 135   _cur_weak_ref_proc_time_ms = 0.0;
 136   _cur_collection_start_sec = 0.0;
 137   _root_region_scan_wait_time_ms = 0.0;
 138   _external_accounted_time_ms = 0.0;
 139   _recorded_clear_claimed_marks_time_ms = 0.0;
 140   _recorded_young_cset_choice_time_ms = 0.0;
 141   _recorded_non_young_cset_choice_time_ms = 0.0;
 142   _recorded_redirty_logged_cards_time_ms = 0.0;
 143   _recorded_preserve_cm_referents_time_ms = 0.0;
 144   _recorded_merge_pss_time_ms = 0.0;
 145   _recorded_start_new_cset_time_ms = 0.0;
 146   _recorded_total_free_cset_time_ms = 0.0;
 147   _recorded_serial_free_cset_time_ms = 0.0;
 148   _cur_fast_reclaim_humongous_time_ms = 0.0;
 149   _cur_fast_reclaim_humongous_register_time_ms = 0.0;
 150   _cur_fast_reclaim_humongous_total = 0;
 151   _cur_fast_reclaim_humongous_candidates = 0;
 152   _cur_fast_reclaim_humongous_reclaimed = 0;
 153   _cur_verify_before_time_ms = 0.0;
 154   _cur_verify_after_time_ms = 0.0;
 155 


 370   debug_phase(_gc_par_phases[CodeRoots]);
 371 #if INCLUDE_AOT
 372   debug_phase(_gc_par_phases[AOTCodeRoots]);
 373 #endif
 374   debug_phase(_gc_par_phases[ObjCopy]);
 375   debug_phase(_gc_par_phases[Termination]);
 376   debug_phase(_gc_par_phases[Other]);
 377   debug_phase(_gc_par_phases[GCWorkerTotal]);
 378   trace_phase(_gc_par_phases[GCWorkerEnd], false);
 379 
 380   return sum_ms;
 381 }
 382 
 383 double G1GCPhaseTimes::print_post_evacuate_collection_set() const {
 384   const double evac_fail_handling = _cur_evac_fail_recalc_used +
 385                                     _cur_evac_fail_remove_self_forwards;
 386   const double sum_ms = evac_fail_handling +
 387                         _cur_collection_code_root_fixup_time_ms +
 388                         _recorded_preserve_cm_referents_time_ms +
 389                         _cur_ref_proc_time_ms +
 390                         _cur_weak_ref_proc_time_ms +
 391                         _cur_ref_enq_time_ms +
 392                         _cur_clear_ct_time_ms +
 393                         _recorded_merge_pss_time_ms +
 394                         _cur_strong_code_root_purge_time_ms +
 395                         _recorded_redirty_logged_cards_time_ms +
 396                         _recorded_total_free_cset_time_ms +
 397                         _cur_fast_reclaim_humongous_time_ms +
 398                         _cur_expand_heap_time_ms +
 399                         _cur_string_dedup_fixup_time_ms;
 400 
 401   info_time("Post Evacuate Collection Set", sum_ms);
 402 
 403   debug_time("Code Roots Fixup", _cur_collection_code_root_fixup_time_ms);
 404 
 405   debug_time("Preserve CM Refs", _recorded_preserve_cm_referents_time_ms);
 406   trace_phase(_gc_par_phases[PreserveCMReferents]);
 407 
 408   debug_time_for_reference("Reference Processing", _cur_ref_proc_time_ms);
 409   _ref_phase_times.print_all_references(2, false);
 410 
 411   debug_time("Weak Processing", _cur_weak_ref_proc_time_ms);
 412 
 413   if (G1StringDedup::is_enabled()) {
 414     debug_time("String Dedup Fixup", _cur_string_dedup_fixup_time_ms);
 415     debug_phase(_gc_par_phases[StringDedupQueueFixup]);
 416     debug_phase(_gc_par_phases[StringDedupTableFixup]);
 417   }
 418 
 419   debug_time("Clear Card Table", _cur_clear_ct_time_ms);
 420 
 421   if (G1CollectedHeap::heap()->evacuation_failed()) {
 422     debug_time("Evacuation Failure", evac_fail_handling);
 423     trace_time("Recalculate Used", _cur_evac_fail_recalc_used);
 424     trace_time("Remove Self Forwards",_cur_evac_fail_remove_self_forwards);
 425   }
 426 
 427   debug_time_for_reference("Reference Enqueuing", _cur_ref_enq_time_ms);
 428   _ref_phase_times.print_enqueue_phase(2, false);
 429 
 430   debug_time("Merge Per-Thread State", _recorded_merge_pss_time_ms);
 431   debug_time("Code Roots Purge", _cur_strong_code_root_purge_time_ms);


< prev index next >