48 static double cost_per_card_ms_defaults[] = { |
48 static double cost_per_card_ms_defaults[] = { |
49 0.01, 0.005, 0.005, 0.003, 0.003, 0.002, 0.002, 0.0015 |
49 0.01, 0.005, 0.005, 0.003, 0.003, 0.002, 0.002, 0.0015 |
50 }; |
50 }; |
51 |
51 |
52 // all the same |
52 // all the same |
53 static double fully_young_cards_per_entry_ratio_defaults[] = { |
53 static double young_cards_per_entry_ratio_defaults[] = { |
54 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 |
54 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 |
55 }; |
55 }; |
56 |
56 |
57 static double cost_per_entry_ms_defaults[] = { |
57 static double cost_per_entry_ms_defaults[] = { |
58 0.015, 0.01, 0.01, 0.008, 0.008, 0.0055, 0.0055, 0.005 |
58 0.015, 0.01, 0.01, 0.008, 0.008, 0.0055, 0.0055, 0.005 |
166 _alloc_rate_ms_seq(new TruncatedSeq(TruncatedSeqLength)), |
166 _alloc_rate_ms_seq(new TruncatedSeq(TruncatedSeqLength)), |
167 _prev_collection_pause_end_ms(0.0), |
167 _prev_collection_pause_end_ms(0.0), |
168 _pending_card_diff_seq(new TruncatedSeq(TruncatedSeqLength)), |
168 _pending_card_diff_seq(new TruncatedSeq(TruncatedSeqLength)), |
169 _rs_length_diff_seq(new TruncatedSeq(TruncatedSeqLength)), |
169 _rs_length_diff_seq(new TruncatedSeq(TruncatedSeqLength)), |
170 _cost_per_card_ms_seq(new TruncatedSeq(TruncatedSeqLength)), |
170 _cost_per_card_ms_seq(new TruncatedSeq(TruncatedSeqLength)), |
171 _fully_young_cards_per_entry_ratio_seq(new TruncatedSeq(TruncatedSeqLength)), |
171 _young_cards_per_entry_ratio_seq(new TruncatedSeq(TruncatedSeqLength)), |
172 _partially_young_cards_per_entry_ratio_seq( |
172 _mixed_cards_per_entry_ratio_seq(new TruncatedSeq(TruncatedSeqLength)), |
173 new TruncatedSeq(TruncatedSeqLength)), |
|
174 _cost_per_entry_ms_seq(new TruncatedSeq(TruncatedSeqLength)), |
173 _cost_per_entry_ms_seq(new TruncatedSeq(TruncatedSeqLength)), |
175 _partially_young_cost_per_entry_ms_seq(new TruncatedSeq(TruncatedSeqLength)), |
174 _mixed_cost_per_entry_ms_seq(new TruncatedSeq(TruncatedSeqLength)), |
176 _cost_per_byte_ms_seq(new TruncatedSeq(TruncatedSeqLength)), |
175 _cost_per_byte_ms_seq(new TruncatedSeq(TruncatedSeqLength)), |
177 _cost_per_byte_ms_during_cm_seq(new TruncatedSeq(TruncatedSeqLength)), |
176 _cost_per_byte_ms_during_cm_seq(new TruncatedSeq(TruncatedSeqLength)), |
178 _constant_other_time_ms_seq(new TruncatedSeq(TruncatedSeqLength)), |
177 _constant_other_time_ms_seq(new TruncatedSeq(TruncatedSeqLength)), |
179 _young_other_cost_per_region_ms_seq(new TruncatedSeq(TruncatedSeqLength)), |
178 _young_other_cost_per_region_ms_seq(new TruncatedSeq(TruncatedSeqLength)), |
180 _non_young_other_cost_per_region_ms_seq( |
179 _non_young_other_cost_per_region_ms_seq( |
183 _pending_cards_seq(new TruncatedSeq(TruncatedSeqLength)), |
182 _pending_cards_seq(new TruncatedSeq(TruncatedSeqLength)), |
184 _rs_lengths_seq(new TruncatedSeq(TruncatedSeqLength)), |
183 _rs_lengths_seq(new TruncatedSeq(TruncatedSeqLength)), |
185 |
184 |
186 _pause_time_target_ms((double) MaxGCPauseMillis), |
185 _pause_time_target_ms((double) MaxGCPauseMillis), |
187 |
186 |
188 _full_young_gcs(true), |
187 _gcs_are_young(true), |
189 _full_young_pause_num(0), |
188 _young_pause_num(0), |
190 _partial_young_pause_num(0), |
189 _mixed_pause_num(0), |
191 |
190 |
192 _during_marking(false), |
191 _during_marking(false), |
193 _in_marking_window(false), |
192 _in_marking_window(false), |
194 _in_marking_window_im(false), |
193 _in_marking_window_im(false), |
195 |
194 |
196 _known_garbage_ratio(0.0), |
195 _known_garbage_ratio(0.0), |
197 _known_garbage_bytes(0), |
196 _known_garbage_bytes(0), |
198 |
197 |
199 _young_gc_eff_seq(new TruncatedSeq(TruncatedSeqLength)), |
198 _young_gc_eff_seq(new TruncatedSeq(TruncatedSeqLength)), |
200 |
199 |
201 _recent_prev_end_times_for_all_gcs_sec(new TruncatedSeq(NumPrevPausesForHeuristics)), |
200 _recent_prev_end_times_for_all_gcs_sec( |
|
201 new TruncatedSeq(NumPrevPausesForHeuristics)), |
202 |
202 |
203 _recent_avg_pause_time_ratio(0.0), |
203 _recent_avg_pause_time_ratio(0.0), |
204 |
204 |
205 _all_full_gc_times_ms(new NumberSeq()), |
205 _all_full_gc_times_ms(new NumberSeq()), |
206 |
206 |
207 _initiate_conc_mark_if_possible(false), |
207 _initiate_conc_mark_if_possible(false), |
208 _during_initial_mark_pause(false), |
208 _during_initial_mark_pause(false), |
209 _should_revert_to_full_young_gcs(false), |
209 _should_revert_to_young_gcs(false), |
210 _last_full_young_gc(false), |
210 _last_young_gc(false), |
|
211 _last_gc_was_young(false), |
211 |
212 |
212 _eden_bytes_before_gc(0), |
213 _eden_bytes_before_gc(0), |
213 _survivor_bytes_before_gc(0), |
214 _survivor_bytes_before_gc(0), |
214 _capacity_before_gc(0), |
215 _capacity_before_gc(0), |
215 |
216 |
306 index = ParallelGCThreads - 1; |
307 index = ParallelGCThreads - 1; |
307 |
308 |
308 _pending_card_diff_seq->add(0.0); |
309 _pending_card_diff_seq->add(0.0); |
309 _rs_length_diff_seq->add(rs_length_diff_defaults[index]); |
310 _rs_length_diff_seq->add(rs_length_diff_defaults[index]); |
310 _cost_per_card_ms_seq->add(cost_per_card_ms_defaults[index]); |
311 _cost_per_card_ms_seq->add(cost_per_card_ms_defaults[index]); |
311 _fully_young_cards_per_entry_ratio_seq->add( |
312 _young_cards_per_entry_ratio_seq->add( |
312 fully_young_cards_per_entry_ratio_defaults[index]); |
313 young_cards_per_entry_ratio_defaults[index]); |
313 _cost_per_entry_ms_seq->add(cost_per_entry_ms_defaults[index]); |
314 _cost_per_entry_ms_seq->add(cost_per_entry_ms_defaults[index]); |
314 _cost_per_byte_ms_seq->add(cost_per_byte_ms_defaults[index]); |
315 _cost_per_byte_ms_seq->add(cost_per_byte_ms_defaults[index]); |
315 _constant_other_time_ms_seq->add(constant_other_time_ms_defaults[index]); |
316 _constant_other_time_ms_seq->add(constant_other_time_ms_defaults[index]); |
316 _young_other_cost_per_region_ms_seq->add( |
317 _young_other_cost_per_region_ms_seq->add( |
317 young_other_cost_per_region_ms_defaults[index]); |
318 young_other_cost_per_region_ms_defaults[index]); |
617 // Don't calculate anything and let the code below bound it to |
618 // Don't calculate anything and let the code below bound it to |
618 // the desired_min_length, i.e., do the next GC as soon as |
619 // the desired_min_length, i.e., do the next GC as soon as |
619 // possible to maximize how many old regions we can add to it. |
620 // possible to maximize how many old regions we can add to it. |
620 } |
621 } |
621 } else { |
622 } else { |
622 if (full_young_gcs()) { |
623 if (gcs_are_young()) { |
623 young_list_target_length = _young_list_fixed_length; |
624 young_list_target_length = _young_list_fixed_length; |
624 } else { |
625 } else { |
625 // A bit arbitrary: during partially-young GCs we allocate half |
626 // A bit arbitrary: during mixed GCs we allocate half |
626 // the young regions to try to add old regions to the CSet. |
627 // the young regions to try to add old regions to the CSet. |
627 young_list_target_length = _young_list_fixed_length / 2; |
628 young_list_target_length = _young_list_fixed_length / 2; |
628 // We choose to accept that we might go under the desired min |
629 // We choose to accept that we might go under the desired min |
629 // length given that we intentionally ask for a smaller young gen. |
630 // length given that we intentionally ask for a smaller young gen. |
630 desired_min_length = absolute_min_length; |
631 desired_min_length = absolute_min_length; |
653 G1CollectorPolicy::calculate_young_list_target_length(size_t rs_lengths, |
654 G1CollectorPolicy::calculate_young_list_target_length(size_t rs_lengths, |
654 size_t base_min_length, |
655 size_t base_min_length, |
655 size_t desired_min_length, |
656 size_t desired_min_length, |
656 size_t desired_max_length) { |
657 size_t desired_max_length) { |
657 assert(adaptive_young_list_length(), "pre-condition"); |
658 assert(adaptive_young_list_length(), "pre-condition"); |
658 assert(full_young_gcs(), "only call this for fully-young GCs"); |
659 assert(gcs_are_young(), "only call this for young GCs"); |
659 |
660 |
660 // In case some edge-condition makes the desired max length too small... |
661 // In case some edge-condition makes the desired max length too small... |
661 if (desired_max_length <= desired_min_length) { |
662 if (desired_max_length <= desired_min_length) { |
662 return desired_min_length; |
663 return desired_min_length; |
663 } |
664 } |
856 |
857 |
857 update_recent_gc_times(end_sec, full_gc_time_ms); |
858 update_recent_gc_times(end_sec, full_gc_time_ms); |
858 |
859 |
859 _g1->clear_full_collection(); |
860 _g1->clear_full_collection(); |
860 |
861 |
861 // "Nuke" the heuristics that control the fully/partially young GC |
862 // "Nuke" the heuristics that control the young/mixed GC |
862 // transitions and make sure we start with fully young GCs after the |
863 // transitions and make sure we start with young GCs after the Full GC. |
863 // Full GC. |
864 set_gcs_are_young(true); |
864 set_full_young_gcs(true); |
865 _last_young_gc = false; |
865 _last_full_young_gc = false; |
866 _should_revert_to_young_gcs = false; |
866 _should_revert_to_full_young_gcs = false; |
|
867 clear_initiate_conc_mark_if_possible(); |
867 clear_initiate_conc_mark_if_possible(); |
868 clear_during_initial_mark_pause(); |
868 clear_during_initial_mark_pause(); |
869 _known_garbage_bytes = 0; |
869 _known_garbage_bytes = 0; |
870 _known_garbage_ratio = 0.0; |
870 _known_garbage_ratio = 0.0; |
871 _in_marking_window = false; |
871 _in_marking_window = false; |
1456 if (during_initial_mark_pause()) { |
1456 if (during_initial_mark_pause()) { |
1457 new_in_marking_window = true; |
1457 new_in_marking_window = true; |
1458 new_in_marking_window_im = true; |
1458 new_in_marking_window_im = true; |
1459 } |
1459 } |
1460 |
1460 |
1461 if (_last_full_young_gc) { |
1461 if (_last_young_gc) { |
1462 if (!last_pause_included_initial_mark) { |
1462 if (!last_pause_included_initial_mark) { |
1463 ergo_verbose2(ErgoPartiallyYoungGCs, |
1463 ergo_verbose2(ErgoMixedGCs, |
1464 "start partially-young GCs", |
1464 "start mixed GCs", |
1465 ergo_format_byte_perc("known garbage"), |
1465 ergo_format_byte_perc("known garbage"), |
1466 _known_garbage_bytes, _known_garbage_ratio * 100.0); |
1466 _known_garbage_bytes, _known_garbage_ratio * 100.0); |
1467 set_full_young_gcs(false); |
1467 set_gcs_are_young(false); |
1468 } else { |
1468 } else { |
1469 ergo_verbose0(ErgoPartiallyYoungGCs, |
1469 ergo_verbose0(ErgoMixedGCs, |
1470 "do not start partially-young GCs", |
1470 "do not start mixed GCs", |
1471 ergo_format_reason("concurrent cycle is about to start")); |
1471 ergo_format_reason("concurrent cycle is about to start")); |
1472 } |
1472 } |
1473 _last_full_young_gc = false; |
1473 _last_young_gc = false; |
1474 } |
1474 } |
1475 |
1475 |
1476 if ( !_last_young_gc_full ) { |
1476 if (!_last_gc_was_young) { |
1477 if (_should_revert_to_full_young_gcs) { |
1477 if (_should_revert_to_young_gcs) { |
1478 ergo_verbose2(ErgoPartiallyYoungGCs, |
1478 ergo_verbose2(ErgoMixedGCs, |
1479 "end partially-young GCs", |
1479 "end mixed GCs", |
1480 ergo_format_reason("partially-young GCs end requested") |
1480 ergo_format_reason("mixed GCs end requested") |
1481 ergo_format_byte_perc("known garbage"), |
1481 ergo_format_byte_perc("known garbage"), |
1482 _known_garbage_bytes, _known_garbage_ratio * 100.0); |
1482 _known_garbage_bytes, _known_garbage_ratio * 100.0); |
1483 set_full_young_gcs(true); |
1483 set_gcs_are_young(true); |
1484 } else if (_known_garbage_ratio < 0.05) { |
1484 } else if (_known_garbage_ratio < 0.05) { |
1485 ergo_verbose3(ErgoPartiallyYoungGCs, |
1485 ergo_verbose3(ErgoMixedGCs, |
1486 "end partially-young GCs", |
1486 "end mixed GCs", |
1487 ergo_format_reason("known garbage percent lower than threshold") |
1487 ergo_format_reason("known garbage percent lower than threshold") |
1488 ergo_format_byte_perc("known garbage") |
1488 ergo_format_byte_perc("known garbage") |
1489 ergo_format_perc("threshold"), |
1489 ergo_format_perc("threshold"), |
1490 _known_garbage_bytes, _known_garbage_ratio * 100.0, |
1490 _known_garbage_bytes, _known_garbage_ratio * 100.0, |
1491 0.05 * 100.0); |
1491 0.05 * 100.0); |
1492 set_full_young_gcs(true); |
1492 set_gcs_are_young(true); |
1493 } else if (adaptive_young_list_length() && |
1493 } else if (adaptive_young_list_length() && |
1494 (get_gc_eff_factor() * cur_efficiency < predict_young_gc_eff())) { |
1494 (get_gc_eff_factor() * cur_efficiency < predict_young_gc_eff())) { |
1495 ergo_verbose5(ErgoPartiallyYoungGCs, |
1495 ergo_verbose5(ErgoMixedGCs, |
1496 "end partially-young GCs", |
1496 "end mixed GCs", |
1497 ergo_format_reason("current GC efficiency lower than " |
1497 ergo_format_reason("current GC efficiency lower than " |
1498 "predicted fully-young GC efficiency") |
1498 "predicted young GC efficiency") |
1499 ergo_format_double("GC efficiency factor") |
1499 ergo_format_double("GC efficiency factor") |
1500 ergo_format_double("current GC efficiency") |
1500 ergo_format_double("current GC efficiency") |
1501 ergo_format_double("predicted fully-young GC efficiency") |
1501 ergo_format_double("predicted young GC efficiency") |
1502 ergo_format_byte_perc("known garbage"), |
1502 ergo_format_byte_perc("known garbage"), |
1503 get_gc_eff_factor(), cur_efficiency, |
1503 get_gc_eff_factor(), cur_efficiency, |
1504 predict_young_gc_eff(), |
1504 predict_young_gc_eff(), |
1505 _known_garbage_bytes, _known_garbage_ratio * 100.0); |
1505 _known_garbage_bytes, _known_garbage_ratio * 100.0); |
1506 set_full_young_gcs(true); |
1506 set_gcs_are_young(true); |
1507 } |
1507 } |
1508 } |
1508 } |
1509 _should_revert_to_full_young_gcs = false; |
1509 _should_revert_to_young_gcs = false; |
1510 |
1510 |
1511 if (_last_young_gc_full && !_during_marking) { |
1511 if (_last_gc_was_young && !_during_marking) { |
1512 _young_gc_eff_seq->add(cur_efficiency); |
1512 _young_gc_eff_seq->add(cur_efficiency); |
1513 } |
1513 } |
1514 |
1514 |
1515 _short_lived_surv_rate_group->start_adding_regions(); |
1515 _short_lived_surv_rate_group->start_adding_regions(); |
1516 // do that for any other surv rate groupsx |
1516 // do that for any other surv rate groupsx |
1532 size_t cards_scanned = _g1->cards_scanned(); |
1532 size_t cards_scanned = _g1->cards_scanned(); |
1533 |
1533 |
1534 double cost_per_entry_ms = 0.0; |
1534 double cost_per_entry_ms = 0.0; |
1535 if (cards_scanned > 10) { |
1535 if (cards_scanned > 10) { |
1536 cost_per_entry_ms = scan_rs_time / (double) cards_scanned; |
1536 cost_per_entry_ms = scan_rs_time / (double) cards_scanned; |
1537 if (_last_young_gc_full) |
1537 if (_last_gc_was_young) { |
1538 _cost_per_entry_ms_seq->add(cost_per_entry_ms); |
1538 _cost_per_entry_ms_seq->add(cost_per_entry_ms); |
1539 else |
1539 } else { |
1540 _partially_young_cost_per_entry_ms_seq->add(cost_per_entry_ms); |
1540 _mixed_cost_per_entry_ms_seq->add(cost_per_entry_ms); |
|
1541 } |
1541 } |
1542 } |
1542 |
1543 |
1543 if (_max_rs_lengths > 0) { |
1544 if (_max_rs_lengths > 0) { |
1544 double cards_per_entry_ratio = |
1545 double cards_per_entry_ratio = |
1545 (double) cards_scanned / (double) _max_rs_lengths; |
1546 (double) cards_scanned / (double) _max_rs_lengths; |
1546 if (_last_young_gc_full) |
1547 if (_last_gc_was_young) { |
1547 _fully_young_cards_per_entry_ratio_seq->add(cards_per_entry_ratio); |
1548 _young_cards_per_entry_ratio_seq->add(cards_per_entry_ratio); |
1548 else |
1549 } else { |
1549 _partially_young_cards_per_entry_ratio_seq->add(cards_per_entry_ratio); |
1550 _mixed_cards_per_entry_ratio_seq->add(cards_per_entry_ratio); |
|
1551 } |
1550 } |
1552 } |
1551 |
1553 |
1552 // It turns out that, sometimes, _max_rs_lengths can get smaller |
1554 // It turns out that, sometimes, _max_rs_lengths can get smaller |
1553 // than _recorded_rs_lengths which causes rs_length_diff to get |
1555 // than _recorded_rs_lengths which causes rs_length_diff to get |
1554 // very large and mess up the RSet length predictions. We'll be |
1556 // very large and mess up the RSet length predictions. We'll be |
1720 young_num += adjustment; |
1723 young_num += adjustment; |
1721 size_t pending_cards = predict_pending_cards(); |
1724 size_t pending_cards = predict_pending_cards(); |
1722 size_t rs_lengths = g1h->young_list()->sampled_rs_lengths() + |
1725 size_t rs_lengths = g1h->young_list()->sampled_rs_lengths() + |
1723 predict_rs_length_diff(); |
1726 predict_rs_length_diff(); |
1724 size_t card_num; |
1727 size_t card_num; |
1725 if (full_young_gcs()) |
1728 if (gcs_are_young()) { |
1726 card_num = predict_young_card_num(rs_lengths); |
1729 card_num = predict_young_card_num(rs_lengths); |
1727 else |
1730 } else { |
1728 card_num = predict_non_young_card_num(rs_lengths); |
1731 card_num = predict_non_young_card_num(rs_lengths); |
|
1732 } |
1729 size_t young_byte_size = young_num * HeapRegion::GrainBytes; |
1733 size_t young_byte_size = young_num * HeapRegion::GrainBytes; |
1730 double accum_yg_surv_rate = |
1734 double accum_yg_surv_rate = |
1731 _short_lived_surv_rate_group->accum_surv_rate(adjustment); |
1735 _short_lived_surv_rate_group->accum_surv_rate(adjustment); |
1732 |
1736 |
1733 size_t bytes_to_copy = |
1737 size_t bytes_to_copy = |
1815 void G1CollectorPolicy::check_if_region_is_too_expensive(double |
1821 void G1CollectorPolicy::check_if_region_is_too_expensive(double |
1816 predicted_time_ms) { |
1822 predicted_time_ms) { |
1817 // I don't think we need to do this when in young GC mode since |
1823 // I don't think we need to do this when in young GC mode since |
1818 // marking will be initiated next time we hit the soft limit anyway... |
1824 // marking will be initiated next time we hit the soft limit anyway... |
1819 if (predicted_time_ms > _expensive_region_limit_ms) { |
1825 if (predicted_time_ms > _expensive_region_limit_ms) { |
1820 ergo_verbose2(ErgoPartiallyYoungGCs, |
1826 ergo_verbose2(ErgoMixedGCs, |
1821 "request partially-young GCs end", |
1827 "request mixed GCs end", |
1822 ergo_format_reason("predicted region time higher than threshold") |
1828 ergo_format_reason("predicted region time higher than threshold") |
1823 ergo_format_ms("predicted region time") |
1829 ergo_format_ms("predicted region time") |
1824 ergo_format_ms("threshold"), |
1830 ergo_format_ms("threshold"), |
1825 predicted_time_ms, _expensive_region_limit_ms); |
1831 predicted_time_ms, _expensive_region_limit_ms); |
1826 // no point in doing another partial one |
1832 // no point in doing another mixed GC |
1827 _should_revert_to_full_young_gcs = true; |
1833 _should_revert_to_young_gcs = true; |
1828 } |
1834 } |
1829 } |
1835 } |
1830 |
1836 |
1831 void G1CollectorPolicy::update_recent_gc_times(double end_time_sec, |
1837 void G1CollectorPolicy::update_recent_gc_times(double end_time_sec, |
1832 double elapsed_ms) { |
1838 double elapsed_ms) { |
2031 if (TraceGen0Time) { |
2037 if (TraceGen0Time) { |
2032 gclog_or_tty->print_cr("ALL PAUSES"); |
2038 gclog_or_tty->print_cr("ALL PAUSES"); |
2033 print_summary_sd(0, "Total", _all_pause_times_ms); |
2039 print_summary_sd(0, "Total", _all_pause_times_ms); |
2034 gclog_or_tty->print_cr(""); |
2040 gclog_or_tty->print_cr(""); |
2035 gclog_or_tty->print_cr(""); |
2041 gclog_or_tty->print_cr(""); |
2036 gclog_or_tty->print_cr(" Full Young GC Pauses: %8d", _full_young_pause_num); |
2042 gclog_or_tty->print_cr(" Young GC Pauses: %8d", _young_pause_num); |
2037 gclog_or_tty->print_cr(" Partial Young GC Pauses: %8d", _partial_young_pause_num); |
2043 gclog_or_tty->print_cr(" Mixed GC Pauses: %8d", _mixed_pause_num); |
2038 gclog_or_tty->print_cr(""); |
2044 gclog_or_tty->print_cr(""); |
2039 |
2045 |
2040 gclog_or_tty->print_cr("EVACUATION PAUSES"); |
2046 gclog_or_tty->print_cr("EVACUATION PAUSES"); |
2041 print_summary(_summary); |
2047 print_summary(_summary); |
2042 |
2048 |
2186 // The concurrent marking thread is not "during a cycle", i.e., |
2192 // The concurrent marking thread is not "during a cycle", i.e., |
2187 // it has completed the last one. So we can go ahead and |
2193 // it has completed the last one. So we can go ahead and |
2188 // initiate a new cycle. |
2194 // initiate a new cycle. |
2189 |
2195 |
2190 set_during_initial_mark_pause(); |
2196 set_during_initial_mark_pause(); |
2191 // We do not allow non-full young GCs during marking. |
2197 // We do not allow mixed GCs during marking. |
2192 if (!full_young_gcs()) { |
2198 if (!gcs_are_young()) { |
2193 set_full_young_gcs(true); |
2199 set_gcs_are_young(true); |
2194 ergo_verbose0(ErgoPartiallyYoungGCs, |
2200 ergo_verbose0(ErgoMixedGCs, |
2195 "end partially-young GCs", |
2201 "end mixed GCs", |
2196 ergo_format_reason("concurrent cycle is about to start")); |
2202 ergo_format_reason("concurrent cycle is about to start")); |
2197 } |
2203 } |
2198 |
2204 |
2199 // And we can now clear initiate_conc_mark_if_possible() as |
2205 // And we can now clear initiate_conc_mark_if_possible() as |
2200 // we've already acted on it. |
2206 // we've already acted on it. |
2730 } |
2736 } |
2731 } |
2737 } |
2732 } while (should_continue); |
2738 } while (should_continue); |
2733 |
2739 |
2734 if (!adaptive_young_list_length() && |
2740 if (!adaptive_young_list_length() && |
2735 cset_region_length() < _young_list_fixed_length) { |
2741 cset_region_length() < _young_list_fixed_length) { |
2736 ergo_verbose2(ErgoCSetConstruction, |
2742 ergo_verbose2(ErgoCSetConstruction, |
2737 "request partially-young GCs end", |
2743 "request mixed GCs end", |
2738 ergo_format_reason("CSet length lower than target") |
2744 ergo_format_reason("CSet length lower than target") |
2739 ergo_format_region("CSet") |
2745 ergo_format_region("CSet") |
2740 ergo_format_region("young target"), |
2746 ergo_format_region("young target"), |
2741 cset_region_length(), _young_list_fixed_length); |
2747 cset_region_length(), _young_list_fixed_length); |
2742 _should_revert_to_full_young_gcs = true; |
2748 _should_revert_to_young_gcs = true; |
2743 } |
2749 } |
2744 |
2750 |
2745 ergo_verbose2(ErgoCSetConstruction | ErgoHigh, |
2751 ergo_verbose2(ErgoCSetConstruction | ErgoHigh, |
2746 "add old regions to CSet", |
2752 "add old regions to CSet", |
2747 ergo_format_region("old") |
2753 ergo_format_region("old") |