mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-19 18:44:38 +02:00
8164936: G1 age table printout contains contents from previous GC
Split tenuring threshold update and printing into two separate parts so that they can be used independently. Reviewed-by: jmasa, sangheki
This commit is contained in:
parent
8b9c8fc1c4
commit
e4f4b40488
8 changed files with 154 additions and 23 deletions
|
@ -564,9 +564,18 @@ HeapWord* DefNewGeneration::expand_and_allocate(size_t size,
|
|||
|
||||
void DefNewGeneration::adjust_desired_tenuring_threshold() {
|
||||
// Set the desired survivor size to half the real survivor space
|
||||
GCPolicyCounters* gc_counters = GenCollectedHeap::heap()->gen_policy()->counters();
|
||||
_tenuring_threshold =
|
||||
age_table()->compute_tenuring_threshold(to()->capacity()/HeapWordSize, gc_counters);
|
||||
size_t const survivor_capacity = to()->capacity() / HeapWordSize;
|
||||
size_t const desired_survivor_size = (size_t)((((double)survivor_capacity) * TargetSurvivorRatio) / 100);
|
||||
|
||||
_tenuring_threshold = age_table()->compute_tenuring_threshold(desired_survivor_size);
|
||||
|
||||
if (UsePerfData) {
|
||||
GCPolicyCounters* gc_counters = GenCollectedHeap::heap()->gen_policy()->counters();
|
||||
gc_counters->tenuring_threshold()->set_value(_tenuring_threshold);
|
||||
gc_counters->desired_survivor_size()->set_value(desired_survivor_size * oopSize);
|
||||
}
|
||||
|
||||
age_table()->print_age_table(_tenuring_threshold);
|
||||
}
|
||||
|
||||
void DefNewGeneration::collect(bool full,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue