< prev index next >
src/hotspot/share/gc/g1/g1Policy.cpp
Print this page
rev 56940 : imported patch 8228609-used-vs-copied-bytes
rev 56941 : [mq]: 8228609-kbarrett-review
rev 56942 : imported patch 8227739-merge-scan-rs-update-rs-cost
rev 56946 : imported patch 8227434-g1-predictions-overflow
rev 56952 : [mq]: 8233588-cleanup-survrategroup
*** 905,920 ****
void G1Policy::print_phases() {
phase_times()->print();
}
- double G1Policy::predict_yg_surv_rate(int age, SurvRateGroup* surv_rate_group) const {
- TruncatedSeq* seq = surv_rate_group->get_seq(age);
- guarantee(seq->num() > 0, "There should be some young gen survivor samples available. Tried to access with age %d", age);
- return _predictor.get_new_unit_prediction(seq);
- }
-
double G1Policy::accum_yg_surv_rate_pred(int age) const {
return _short_lived_surv_rate_group->accum_surv_rate_pred(age);
}
double G1Policy::predict_base_elapsed_time_ms(size_t pending_cards,
--- 905,914 ----
*** 934,947 ****
size_t G1Policy::predict_bytes_to_copy(HeapRegion* hr) const {
size_t bytes_to_copy;
if (!hr->is_young()) {
bytes_to_copy = hr->max_live_bytes();
} else {
! assert(hr->age_in_surv_rate_group() != -1, "invariant");
! int age = hr->age_in_surv_rate_group();
! double yg_surv_rate = predict_yg_surv_rate(age, hr->surv_rate_group());
! bytes_to_copy = (size_t) (hr->used() * yg_surv_rate);
}
return bytes_to_copy;
}
double G1Policy::predict_region_elapsed_time_ms(HeapRegion* hr,
--- 928,938 ----
size_t G1Policy::predict_bytes_to_copy(HeapRegion* hr) const {
size_t bytes_to_copy;
if (!hr->is_young()) {
bytes_to_copy = hr->max_live_bytes();
} else {
! bytes_to_copy = (size_t) (hr->used() * hr->surv_rate_prediction(_predictor));
}
return bytes_to_copy;
}
double G1Policy::predict_region_elapsed_time_ms(HeapRegion* hr,
*** 1393,1403 ****
void G1Policy::transfer_survivors_to_cset(const G1SurvivorRegions* survivors) {
// Add survivor regions to SurvRateGroup.
note_start_adding_survivor_regions();
- finished_recalculating_age_indexes(true /* is_survivors */);
HeapRegion* last = NULL;
for (GrowableArrayIterator<HeapRegion*> it = survivors->regions()->begin();
it != survivors->regions()->end();
++it) {
--- 1384,1393 ----
*** 1415,1422 ****
// Don't clear the survivor list handles until the start of
// the next evacuation pause - we need it in order to re-tag
// the survivor regions from this evacuation pause as 'young'
// at the start of the next.
-
- finished_recalculating_age_indexes(false /* is_survivors */);
}
--- 1405,1410 ----
< prev index next >