Merge
authortschatzl
Fri, 11 Mar 2016 10:06:30 +0100
changeset 37069 732328249e62
parent 37067 1d728037b6a6 (current diff)
parent 37068 fd8357c31be4 (diff)
child 37070 a2b389f23bac
child 37071 d7750d171889
Merge
--- a/hotspot/src/share/vm/gc/g1/g1EvacStats.cpp	Fri Mar 11 09:09:52 2016 +0100
+++ b/hotspot/src/share/vm/gc/g1/g1EvacStats.cpp	Fri Mar 11 10:06:30 2016 +0100
@@ -110,15 +110,9 @@
   size_t const cur_plab_sz = (size_t)((double)total_waste_allowed / G1LastPLABAverageOccupancy);
   // Take historical weighted average
   _filter.sample(cur_plab_sz);
-  // Clip from above and below, and align to object boundary
-  size_t plab_sz;
-  plab_sz = MAX2(min_size(), (size_t)_filter.average());
-  plab_sz = MIN2(max_size(), plab_sz);
-  plab_sz = align_object_size(plab_sz);
-  // Latch the result
-  _desired_net_plab_sz = plab_sz;
+  _desired_net_plab_sz = MAX2(min_size(), (size_t)_filter.average());
 
-  log_sizing(cur_plab_sz, plab_sz);
+  log_sizing(cur_plab_sz, _desired_net_plab_sz);
   // Clear accumulators for next round.
   reset();
 }
--- a/hotspot/src/share/vm/gc/shared/plab.cpp	Fri Mar 11 09:09:52 2016 +0100
+++ b/hotspot/src/share/vm/gc/shared/plab.cpp	Fri Mar 11 10:06:30 2016 +0100
@@ -136,7 +136,7 @@
 
 // Calculates plab size for current number of gc worker threads.
 size_t PLABStats::desired_plab_sz(uint no_of_gc_workers) {
-  return MAX2(min_size(), (size_t)align_object_size(_desired_net_plab_sz / no_of_gc_workers));
+  return (size_t)align_object_size(MIN2(MAX2(min_size(), _desired_net_plab_sz / no_of_gc_workers), max_size()));
 }
 
 // Compute desired plab size for one gc worker thread and latch result for later
@@ -175,14 +175,9 @@
   size_t recent_plab_sz = used / target_refills;
   // Take historical weighted average
   _filter.sample(recent_plab_sz);
-  // Clip from above and below, and align to object boundary
-  size_t new_plab_sz = MAX2(min_size(), (size_t)_filter.average());
-  new_plab_sz = MIN2(max_size(), new_plab_sz);
-  new_plab_sz = align_object_size(new_plab_sz);
-  // Latch the result
-  _desired_net_plab_sz = new_plab_sz;
+  _desired_net_plab_sz = MAX2(min_size(), (size_t)_filter.average());
 
-  log_sizing(recent_plab_sz, new_plab_sz);
+  log_sizing(recent_plab_sz, _desired_net_plab_sz);
 
   reset();
 }