< prev index next >

src/share/vm/gc_implementation/g1/g1GCPhaseTimes.cpp

Print this page
rev 7321 : 8048179: Early reclaim of large objects that are referenced by a few objects
Summary: Push the remembered sets of large objects with few referenced into the dirty card queue at the beginning of the evacuation so that they may end up with zero remembered set entries at the end of the collection, and are potentially reclaimed. Also improve timing measurements of the early reclaim mechanism, and shorten flag names.
Reviewed-by: brutisso, jmasa, dfazunen


 535   if (_cur_verify_before_time_ms > 0.0) {
 536     print_stats(2, "Verify Before", _cur_verify_before_time_ms);
 537   }
 538   if (G1CollectedHeap::heap()->evacuation_failed()) {
 539     double evac_fail_handling = _cur_evac_fail_recalc_used + _cur_evac_fail_remove_self_forwards +
 540       _cur_evac_fail_restore_remsets;
 541     print_stats(2, "Evacuation Failure", evac_fail_handling);
 542     if (G1Log::finest()) {
 543       print_stats(3, "Recalculate Used", _cur_evac_fail_recalc_used);
 544       print_stats(3, "Remove Self Forwards", _cur_evac_fail_remove_self_forwards);
 545       print_stats(3, "Restore RemSet", _cur_evac_fail_restore_remsets);
 546     }
 547   }
 548   print_stats(2, "Choose CSet",
 549     (_recorded_young_cset_choice_time_ms +
 550     _recorded_non_young_cset_choice_time_ms));
 551   print_stats(2, "Ref Proc", _cur_ref_proc_time_ms);
 552   print_stats(2, "Ref Enq", _cur_ref_enq_time_ms);
 553   print_stats(2, "Redirty Cards", _recorded_redirty_logged_cards_time_ms);
 554   par_phase_printer.print(RedirtyCards);
 555   if (G1ReclaimDeadHumongousObjectsAtYoungGC) {
 556     print_stats(2, "Humongous Reclaim", _cur_fast_reclaim_humongous_time_ms);

 557     if (G1Log::finest()) {
 558       print_stats(3, "Humongous Total", _cur_fast_reclaim_humongous_total);
 559       print_stats(3, "Humongous Candidate", _cur_fast_reclaim_humongous_candidates);



 560       print_stats(3, "Humongous Reclaimed", _cur_fast_reclaim_humongous_reclaimed);
 561     }
 562   }
 563   print_stats(2, "Free CSet",
 564     (_recorded_young_free_cset_time_ms +
 565     _recorded_non_young_free_cset_time_ms));
 566   if (G1Log::finest()) {
 567     print_stats(3, "Young Free CSet", _recorded_young_free_cset_time_ms);
 568     print_stats(3, "Non-Young Free CSet", _recorded_non_young_free_cset_time_ms);
 569   }
 570   if (_cur_verify_after_time_ms > 0.0) {
 571     print_stats(2, "Verify After", _cur_verify_after_time_ms);
 572   }
 573 }
 574 
 575 G1GCParPhaseTimesTracker::G1GCParPhaseTimesTracker(G1GCPhaseTimes* phase_times, G1GCPhaseTimes::GCParPhases phase, uint worker_id) :
 576     _phase_times(phase_times), _phase(phase), _worker_id(worker_id) {
 577   if (_phase_times != NULL) {
 578     _start_time = os::elapsedTime();
 579   }


 535   if (_cur_verify_before_time_ms > 0.0) {
 536     print_stats(2, "Verify Before", _cur_verify_before_time_ms);
 537   }
 538   if (G1CollectedHeap::heap()->evacuation_failed()) {
 539     double evac_fail_handling = _cur_evac_fail_recalc_used + _cur_evac_fail_remove_self_forwards +
 540       _cur_evac_fail_restore_remsets;
 541     print_stats(2, "Evacuation Failure", evac_fail_handling);
 542     if (G1Log::finest()) {
 543       print_stats(3, "Recalculate Used", _cur_evac_fail_recalc_used);
 544       print_stats(3, "Remove Self Forwards", _cur_evac_fail_remove_self_forwards);
 545       print_stats(3, "Restore RemSet", _cur_evac_fail_restore_remsets);
 546     }
 547   }
 548   print_stats(2, "Choose CSet",
 549     (_recorded_young_cset_choice_time_ms +
 550     _recorded_non_young_cset_choice_time_ms));
 551   print_stats(2, "Ref Proc", _cur_ref_proc_time_ms);
 552   print_stats(2, "Ref Enq", _cur_ref_enq_time_ms);
 553   print_stats(2, "Redirty Cards", _recorded_redirty_logged_cards_time_ms);
 554   par_phase_printer.print(RedirtyCards);
 555 
 556   if (G1EagerReclaimHumongousObjects) {
 557     print_stats(2, "Humongous Register", _cur_fast_reclaim_humongous_register_time_ms);
 558     if (G1Log::finest()) {
 559       print_stats(3, "Humongous Total", _cur_fast_reclaim_humongous_total);
 560       print_stats(3, "Humongous Candidate", _cur_fast_reclaim_humongous_candidates);
 561     }
 562     print_stats(2, "Humongous Reclaim", _cur_fast_reclaim_humongous_time_ms);
 563     if (G1Log::finest()) {
 564       print_stats(3, "Humongous Reclaimed", _cur_fast_reclaim_humongous_reclaimed);
 565     }
 566   }
 567   print_stats(2, "Free CSet",
 568     (_recorded_young_free_cset_time_ms +
 569     _recorded_non_young_free_cset_time_ms));
 570   if (G1Log::finest()) {
 571     print_stats(3, "Young Free CSet", _recorded_young_free_cset_time_ms);
 572     print_stats(3, "Non-Young Free CSet", _recorded_non_young_free_cset_time_ms);
 573   }
 574   if (_cur_verify_after_time_ms > 0.0) {
 575     print_stats(2, "Verify After", _cur_verify_after_time_ms);
 576   }
 577 }
 578 
 579 G1GCParPhaseTimesTracker::G1GCParPhaseTimesTracker(G1GCPhaseTimes* phase_times, G1GCPhaseTimes::GCParPhases phase, uint worker_id) :
 580     _phase_times(phase_times), _phase(phase), _worker_id(worker_id) {
 581   if (_phase_times != NULL) {
 582     _start_time = os::elapsedTime();
 583   }
< prev index next >