Mercurial > hg > graal-jvmci-8
diff src/share/vm/memory/defNewGeneration.cpp @ 7609:a30e7b564541
8005972: ParNew should not update the tenuring threshold when promotion failed has occurred
Reviewed-by: ysr, johnc, jwilhelm
author | brutisso |
---|---|
date | Mon, 14 Jan 2013 21:30:45 +0100 |
parents | f34d701e952e |
children | 001ec9515f84 |
line wrap: on
line diff
--- a/src/share/vm/memory/defNewGeneration.cpp Mon Jan 14 09:58:52 2013 +0100 +++ b/src/share/vm/memory/defNewGeneration.cpp Mon Jan 14 21:30:45 2013 +0100 @@ -550,6 +550,11 @@ return allocate(size, is_tlab); } +void DefNewGeneration::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); +} void DefNewGeneration::collect(bool full, bool clear_all_soft_refs, @@ -649,9 +654,7 @@ assert(to()->is_empty(), "to space should be empty now"); - // Set the desired survivor size to half the real survivor space - _tenuring_threshold = - age_table()->compute_tenuring_threshold(to()->capacity()/HeapWordSize); + adjust_desired_tenuring_threshold(); // A successful scavenge should restart the GC time limit count which is // for full GC's.