hotspot/src/share/vm/gc/g1/g1EvacStats.cpp
changeset 37068 fd8357c31be4
parent 36390 a2d991d1d628
child 37997 db6541410dfb
equal deleted inserted replaced
37066:f4ebb8b35388 37068:fd8357c31be4
   108 
   108 
   109   size_t const total_waste_allowed = used_for_waste_calculation * TargetPLABWastePct;
   109   size_t const total_waste_allowed = used_for_waste_calculation * TargetPLABWastePct;
   110   size_t const cur_plab_sz = (size_t)((double)total_waste_allowed / G1LastPLABAverageOccupancy);
   110   size_t const cur_plab_sz = (size_t)((double)total_waste_allowed / G1LastPLABAverageOccupancy);
   111   // Take historical weighted average
   111   // Take historical weighted average
   112   _filter.sample(cur_plab_sz);
   112   _filter.sample(cur_plab_sz);
   113   // Clip from above and below, and align to object boundary
   113   _desired_net_plab_sz = MAX2(min_size(), (size_t)_filter.average());
   114   size_t plab_sz;
       
   115   plab_sz = MAX2(min_size(), (size_t)_filter.average());
       
   116   plab_sz = MIN2(max_size(), plab_sz);
       
   117   plab_sz = align_object_size(plab_sz);
       
   118   // Latch the result
       
   119   _desired_net_plab_sz = plab_sz;
       
   120 
   114 
   121   log_sizing(cur_plab_sz, plab_sz);
   115   log_sizing(cur_plab_sz, _desired_net_plab_sz);
   122   // Clear accumulators for next round.
   116   // Clear accumulators for next round.
   123   reset();
   117   reset();
   124 }
   118 }
   125 
   119 
   126 G1EvacStats::G1EvacStats(const char* description, size_t desired_plab_sz_, unsigned wt) :
   120 G1EvacStats::G1EvacStats(const char* description, size_t desired_plab_sz_, unsigned wt) :