7169803: Usage of pretenured value is not correct
authordavid
Wed, 17 Jun 2015 17:29:56 +0200
changeset 31359 e9d8d21c21f3
parent 31358 693058672cc6
child 31361 f3ec2edc1244
child 31363 9c6744fc266e
7169803: Usage of pretenured value is not correct Reviewed-by: tamao, jmasa
hotspot/src/share/vm/gc/parallel/psAdaptiveSizePolicy.cpp
hotspot/src/share/vm/gc/parallel/psOldGen.cpp
--- a/hotspot/src/share/vm/gc/parallel/psAdaptiveSizePolicy.cpp	Wed Jun 17 14:44:54 2015 +0200
+++ b/hotspot/src/share/vm/gc/parallel/psAdaptiveSizePolicy.cpp	Wed Jun 17 17:29:56 2015 +0200
@@ -1304,7 +1304,7 @@
     size_t survived_guess = survived + promoted;
     _avg_survived->sample(survived_guess);
   }
-  avg_promoted()->sample(promoted + _avg_pretenured->padded_average());
+  avg_promoted()->sample(promoted);
 
   if (PrintAdaptiveSizePolicy) {
     gclog_or_tty->print_cr(
--- a/hotspot/src/share/vm/gc/parallel/psOldGen.cpp	Wed Jun 17 14:44:54 2015 +0200
+++ b/hotspot/src/share/vm/gc/parallel/psOldGen.cpp	Wed Jun 17 17:29:56 2015 +0200
@@ -199,7 +199,7 @@
   // Allocations in the old generation need to be reported
   if (res != NULL) {
     ParallelScavengeHeap* heap = ParallelScavengeHeap::heap();
-    heap->size_policy()->tenured_allocation(word_size);
+    heap->size_policy()->tenured_allocation(word_size * HeapWordSize);
   }
 
   return res;