8005972: ParNew should not update the tenuring threshold when promotion failed has occurred

Reviewed-by: ysr, johnc, jwilhelm
This commit is contained in:
Bengt Rutisson 2013-01-14 21:30:45 +01:00
parent a3639fdea1
commit 33b7cd7cae
4 changed files with 11 additions and 15 deletions

View file

@ -878,12 +878,6 @@ void EvacuateFollowersClosureGeneral::do_void() {
bool ParNewGeneration::_avoid_promotion_undo = false;
void ParNewGeneration::adjust_desired_tenuring_threshold() {
// Set the desired survivor size to half the real survivor space
_tenuring_threshold =
age_table()->compute_tenuring_threshold(to()->capacity()/HeapWordSize);
}
// A Generation that does parallel young-gen collection.
void ParNewGeneration::collect(bool full,
@ -1013,6 +1007,8 @@ void ParNewGeneration::collect(bool full,
size_policy->reset_gc_overhead_limit_count();
assert(to()->is_empty(), "to space should be empty now");
adjust_desired_tenuring_threshold();
} else {
assert(_promo_failure_scan_stack.is_empty(), "post condition");
_promo_failure_scan_stack.clear(true); // Clear cached segments.
@ -1035,7 +1031,6 @@ void ParNewGeneration::collect(bool full,
from()->set_concurrent_iteration_safe_limit(from()->top());
to()->set_concurrent_iteration_safe_limit(to()->top());
adjust_desired_tenuring_threshold();
if (ResizePLAB) {
plab_stats()->adjust_desired_plab_sz(n_workers);
}