< prev index next >
src/share/vm/gc/g1/g1CollectorPolicy.cpp
Print this page
rev 9408 : 8143215: gcc 4.1.2: fix three issues breaking the build.
*** 474,484 ****
// (100.0 / G1ConfidencePercent) is a scale factor that expresses the uncertainty
// of the calculation: the lower the confidence, the more headroom.
// (100 + TargetPLABWastePct) represents the increase in expected bytes during
// copying due to anticipated waste in the PLABs.
double safety_factor = (100.0 / G1ConfidencePercent) * (100 + TargetPLABWastePct) / 100.0;
! size_t expected_bytes_to_copy = safety_factor * bytes_to_copy;
if (expected_bytes_to_copy > free_bytes) {
// end condition 3: out-of-space
return false;
}
--- 474,484 ----
// (100.0 / G1ConfidencePercent) is a scale factor that expresses the uncertainty
// of the calculation: the lower the confidence, the more headroom.
// (100 + TargetPLABWastePct) represents the increase in expected bytes during
// copying due to anticipated waste in the PLABs.
double safety_factor = (100.0 / G1ConfidencePercent) * (100 + TargetPLABWastePct) / 100.0;
! size_t expected_bytes_to_copy = (size_t)(safety_factor * bytes_to_copy);
if (expected_bytes_to_copy > free_bytes) {
// end condition 3: out-of-space
return false;
}
*** 521,531 ****
// effectively don't set this bound.
return _young_gen_sizer->max_desired_young_length();
}
void G1CollectorPolicy::update_young_list_max_and_target_length() {
! update_young_list_max_and_target_length(get_new_prediction(_rs_lengths_seq));
}
void G1CollectorPolicy::update_young_list_max_and_target_length(size_t rs_lengths) {
update_young_list_target_length(rs_lengths);
update_max_gc_locker_expansion();
--- 521,531 ----
// effectively don't set this bound.
return _young_gen_sizer->max_desired_young_length();
}
void G1CollectorPolicy::update_young_list_max_and_target_length() {
! update_young_list_max_and_target_length((size_t)get_new_prediction(_rs_lengths_seq));
}
void G1CollectorPolicy::update_young_list_max_and_target_length(size_t rs_lengths) {
update_young_list_target_length(rs_lengths);
update_max_gc_locker_expansion();
*** 534,544 ****
void G1CollectorPolicy::update_young_list_target_length(size_t rs_lengths) {
_young_list_target_length = bounded_young_list_target_length(rs_lengths);
}
void G1CollectorPolicy::update_young_list_target_length() {
! update_young_list_target_length(get_new_prediction(_rs_lengths_seq));
}
uint G1CollectorPolicy::bounded_young_list_target_length(size_t rs_lengths) const {
// Calculate the absolute and desired min bounds.
--- 534,544 ----
void G1CollectorPolicy::update_young_list_target_length(size_t rs_lengths) {
_young_list_target_length = bounded_young_list_target_length(rs_lengths);
}
void G1CollectorPolicy::update_young_list_target_length() {
! update_young_list_target_length((size_t)get_new_prediction(_rs_lengths_seq));
}
uint G1CollectorPolicy::bounded_young_list_target_length(size_t rs_lengths) const {
// Calculate the absolute and desired min bounds.
*** 724,734 ****
update_young_list_max_and_target_length(rs_lengths_prediction);
}
}
void G1CollectorPolicy::update_rs_lengths_prediction() {
! update_rs_lengths_prediction(get_new_prediction(_rs_lengths_seq));
}
void G1CollectorPolicy::update_rs_lengths_prediction(size_t prediction) {
if (collector_state()->gcs_are_young() && adaptive_young_list_length()) {
_rs_lengths_prediction = prediction;
--- 724,734 ----
update_young_list_max_and_target_length(rs_lengths_prediction);
}
}
void G1CollectorPolicy::update_rs_lengths_prediction() {
! update_rs_lengths_prediction((size_t)get_new_prediction(_rs_lengths_seq));
}
void G1CollectorPolicy::update_rs_lengths_prediction(size_t prediction) {
if (collector_state()->gcs_are_young() && adaptive_young_list_length()) {
_rs_lengths_prediction = prediction;
< prev index next >