RFR: 8150183: gc/g1/plab/TestPLABResize.java - previous PLAB size should be less than current
Jon Masamitsu
jon.masamitsu at oracle.com
Thu Feb 25 17:42:57 UTC 2016
On 2/25/2016 7:31 AM, Michail Chernov wrote:
> Hi Jon,
>
>
> On 25.02.2016 17:48, Jon Masamitsu wrote:
>>
>>
>>>
>> http://cr.openjdk.java.net/~mchernov/8150183/webrev.00/test/gc/g1/plab/TestPLABResize.java.frames.html
>>
>>
>> New code
>>
>>> 123 // Check that desired plab size was changed during
>>> iterations.
>>> 124 // It should decrease during first half of iterations
>>> 125 // and increase after.
>>
>> Why does the test assume that the plab will decrease in size?
> Resizing PLAB uses amount of promoted words to calculate desired PLAB
> size. Test allocates decreasing sequence of garbage between young GC
> to be promoted by PLAB. Plab size is changed during test.
If you're referring to AppPLABResize, my reading of the code is that it
does 3 rounds of
allocations: first with fixed size of total allocations, second with
decreasing sizes of allocation,
third with increasing sizes of allocation.
http://cr.openjdk.java.net/~mchernov/8150183/webrev.00/test/gc/g1/plab/TestPLABResize.java.frames.html
> 123 // Check that desired plab size was changed during iterations.
> 124 // It should decrease during first half of iterations
> 125 // and increase after.
> 126 long startDesiredPLABSize = plabSizes.get(testCase.getIterations());
> 127 long endDesiredPLABSize = plabSizes.get(testCase.getIterations() *
> 2 - 1);
I think a better comment would be (replace line 124 and 125)
// The test case does 3 rounds of allocations. The second round of N
allocations and GC's
// has a decreasing size of allocations so that iterations N to 2*N -1
will be of decreasing size.
// The third round with iterations 2*N to 3*N -1 has increasing sizes of
allocation.
Otherwise, changes look good.
Jon
>
> Thanks
> Michail
>
More information about the hotspot-gc-dev
mailing list