Request for review JDK-8151045, , Remove code duplication in PLABStats/G1EvacStats::adjust_desired_plab_sz

Kim Barrett kim.barrett at oracle.com
Tue Feb 21 22:39:33 UTC 2017


> On Feb 21, 2017, at 12:13 PM, Alexander Harlap <alexander.harlap at oracle.com> wrote:
> 
> New revision:
> 
> All suggestions from Kim are here:
> 
> http://cr.openjdk.java.net/~aharlap/8151045/webrev.01/

------------------------------------------------------------------------------
src/share/vm/gc/shared/plab.cpp
 175 size_t PLABStats::compute_desired_plab_sz() {
 176   if (_allocated == 0) {
 177     _allocated = 1;
 178   }
 179   double wasted_frac    = (double)_unused / (double)_allocated;

Rather than modifying _allocated, what I had in mind was something
like

  size_t allocated = MAX2(_allocated, size_t(1));

and then use allocated (rather than _allocated) in the calculation.

------------------------------------------------------------------------------




More information about the hotspot-gc-dev mailing list