Mercurial > hg > graal-jvmci-8
comparison src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp @ 595:3698e8f47799
6804746: G1: guarantee(variance() > -1.0,"variance should be >= 0") (due to evacuation failure)
Summary: Under certain circumstances (evacuation failure) the pause time is not communicated to the policy and, as a result, the pause time field is not initialized properly.
Reviewed-by: jmasa
author | tonyp |
---|---|
date | Tue, 24 Feb 2009 15:50:23 -0500 |
parents | 1e458753107d |
children | 7bb995fbd3c0 6c4cea9bfa11 |
comparison
equal
deleted
inserted
replaced
582:a0576ae7045f | 595:3698e8f47799 |
---|---|
1012 | 1012 |
1013 checkpoint_conc_overhead(); | 1013 checkpoint_conc_overhead(); |
1014 | 1014 |
1015 _all_full_gc_times_ms->add(full_gc_time_ms); | 1015 _all_full_gc_times_ms->add(full_gc_time_ms); |
1016 | 1016 |
1017 update_recent_gc_times(end_sec, full_gc_time_sec); | 1017 update_recent_gc_times(end_sec, full_gc_time_ms); |
1018 | 1018 |
1019 _g1->clear_full_collection(); | 1019 _g1->clear_full_collection(); |
1020 | 1020 |
1021 // "Nuke" the heuristics that control the fully/partially young GC | 1021 // "Nuke" the heuristics that control the fully/partially young GC |
1022 // transitions and make sure we start with fully young GCs after the | 1022 // transitions and make sure we start with fully young GCs after the |
1473 size_t rs_size = | 1473 size_t rs_size = |
1474 _cur_collection_pause_used_regions_at_start - collection_set_size(); | 1474 _cur_collection_pause_used_regions_at_start - collection_set_size(); |
1475 size_t cur_used_bytes = _g1->used(); | 1475 size_t cur_used_bytes = _g1->used(); |
1476 assert(cur_used_bytes == _g1->recalculate_used(), "It should!"); | 1476 assert(cur_used_bytes == _g1->recalculate_used(), "It should!"); |
1477 bool last_pause_included_initial_mark = false; | 1477 bool last_pause_included_initial_mark = false; |
1478 bool update_stats = !abandoned && !_g1->evacuation_failed(); | |
1478 | 1479 |
1479 #ifndef PRODUCT | 1480 #ifndef PRODUCT |
1480 if (G1YoungSurvRateVerbose) { | 1481 if (G1YoungSurvRateVerbose) { |
1481 gclog_or_tty->print_cr(""); | 1482 gclog_or_tty->print_cr(""); |
1482 _short_lived_surv_rate_group->print(); | 1483 _short_lived_surv_rate_group->print(); |
1533 (double)surviving_bytes/ | 1534 (double)surviving_bytes/ |
1534 (double)_collection_set_bytes_used_before; | 1535 (double)_collection_set_bytes_used_before; |
1535 | 1536 |
1536 _n_pauses++; | 1537 _n_pauses++; |
1537 | 1538 |
1538 if (!abandoned) { | 1539 if (update_stats) { |
1539 _recent_CH_strong_roots_times_ms->add(_cur_CH_strong_roots_dur_ms); | 1540 _recent_CH_strong_roots_times_ms->add(_cur_CH_strong_roots_dur_ms); |
1540 _recent_G1_strong_roots_times_ms->add(_cur_G1_strong_roots_dur_ms); | 1541 _recent_G1_strong_roots_times_ms->add(_cur_G1_strong_roots_dur_ms); |
1541 _recent_evac_times_ms->add(evac_ms); | 1542 _recent_evac_times_ms->add(evac_ms); |
1542 _recent_pause_times_ms->add(elapsed_ms); | 1543 _recent_pause_times_ms->add(elapsed_ms); |
1543 | 1544 |
1634 double scan_rs_time = avg_value(_par_last_scan_rs_times_ms); | 1635 double scan_rs_time = avg_value(_par_last_scan_rs_times_ms); |
1635 double obj_copy_time = avg_value(_par_last_obj_copy_times_ms); | 1636 double obj_copy_time = avg_value(_par_last_obj_copy_times_ms); |
1636 double termination_time = avg_value(_par_last_termination_times_ms); | 1637 double termination_time = avg_value(_par_last_termination_times_ms); |
1637 | 1638 |
1638 double parallel_other_time; | 1639 double parallel_other_time; |
1639 if (!abandoned) { | 1640 if (update_stats) { |
1640 MainBodySummary* body_summary = summary->main_body_summary(); | 1641 MainBodySummary* body_summary = summary->main_body_summary(); |
1641 guarantee(body_summary != NULL, "should not be null!"); | 1642 guarantee(body_summary != NULL, "should not be null!"); |
1642 | 1643 |
1643 if (_satb_drain_time_set) | 1644 if (_satb_drain_time_set) |
1644 body_summary->record_satb_drain_time_ms(_cur_satb_drain_time_ms); | 1645 body_summary->record_satb_drain_time_ms(_cur_satb_drain_time_ms); |
1850 _short_lived_surv_rate_group->start_adding_regions(); | 1851 _short_lived_surv_rate_group->start_adding_regions(); |
1851 // do that for any other surv rate groupsx | 1852 // do that for any other surv rate groupsx |
1852 | 1853 |
1853 // <NEW PREDICTION> | 1854 // <NEW PREDICTION> |
1854 | 1855 |
1855 if (!popular && !abandoned) { | 1856 if (!popular && update_stats) { |
1856 double pause_time_ms = elapsed_ms; | 1857 double pause_time_ms = elapsed_ms; |
1857 | 1858 |
1858 size_t diff = 0; | 1859 size_t diff = 0; |
1859 if (_max_pending_cards >= _pending_cards) | 1860 if (_max_pending_cards >= _pending_cards) |
1860 diff = _max_pending_cards - _pending_cards; | 1861 diff = _max_pending_cards - _pending_cards; |