mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-20 02:54:35 +02:00
8005972: ParNew should not update the tenuring threshold when promotion failed has occurred
Reviewed-by: ysr, johnc, jwilhelm
This commit is contained in:
parent
a3639fdea1
commit
33b7cd7cae
4 changed files with 11 additions and 15 deletions
|
@ -550,6 +550,11 @@ HeapWord* DefNewGeneration::expand_and_allocate(size_t size,
|
|||
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 @@ void DefNewGeneration::collect(bool full,
|
|||
|
||||
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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue