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

Alexander Harlap alexander.harlap at oracle.com
Wed Feb 22 20:41:44 UTC 2017


Next version:

http://cr.openjdk.java.net/~aharlap/8151045/webrev.02/

Alex


On 2/21/2017 5:39 PM, Kim Barrett wrote:
>> 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