7169803: Usage of pretenured value is not correct

Reviewed-by: tamao, jmasa
This commit is contained in:
David Lindholm 2015-06-17 17:29:56 +02:00
parent 8a2a6073df
commit 295a084cc5
2 changed files with 2 additions and 2 deletions

View File

@ -1304,7 +1304,7 @@ void PSAdaptiveSizePolicy::update_averages(bool is_survivor_overflow,
size_t survived_guess = survived + promoted; size_t survived_guess = survived + promoted;
_avg_survived->sample(survived_guess); _avg_survived->sample(survived_guess);
} }
avg_promoted()->sample(promoted + _avg_pretenured->padded_average()); avg_promoted()->sample(promoted);
if (PrintAdaptiveSizePolicy) { if (PrintAdaptiveSizePolicy) {
gclog_or_tty->print_cr( gclog_or_tty->print_cr(

View File

@ -199,7 +199,7 @@ HeapWord* PSOldGen::allocate(size_t word_size) {
// Allocations in the old generation need to be reported // Allocations in the old generation need to be reported
if (res != NULL) { if (res != NULL) {
ParallelScavengeHeap* heap = ParallelScavengeHeap::heap(); ParallelScavengeHeap* heap = ParallelScavengeHeap::heap();
heap->size_policy()->tenured_allocation(word_size); heap->size_policy()->tenured_allocation(word_size * HeapWordSize);
} }
return res; return res;