RFR (S): 8132708: Add tests for Humongous objects allocation threshold

Kirill Zhaldybin kirill.zhaldybin at oracle.com
Mon Aug 24 15:23:21 UTC 2015


Hi Thomas,

New webrev (with fixed typo) is here: 
http://cr.openjdk.java.net/~kzhaldyb/webrevs/JDK-8132708/webrev.04/

Thank you.

Regards, Kirill


On 24.08.2015 16:31, Thomas Schatzl wrote:
> Hi Kirill,
>
> On Mon, 2015-08-24 at 16:23 +0300, Kirill Zhaldybin wrote:
>> Hi Thomas,
> [...]
>>>
>>>    - MAX_CONTINIUS_SIZE_CHECK: typo in "CONTINUOUS".
>> Will be fixed in next iteration.
>>
>>>
>>>    - I am a bit puzzled about the verification whether the object should
>>> be humongous. Shouldn't the test program ask the VM whether a given
>>> object is humongous or not?
>>> Currently it seems to me that the test program only checks itself, since
>>> it on the one hand allocates objects of varying sizes, using
>>> REGION_SIZE/2 and then in allocateAndCheck again uses this same formula
>>> to determine that an object is humongous.
>>>
>>> At most the test program seems to verify that
>>> Helpers.detectByteArrayAllocationOverhead() is correct.
>>>
>>> In this case I would expect a whitebox method to ask the VM whether the
>>> given object is a humongous object.
>>
>> There are two asserts in allocateAndCheck:
>> 1. We do some obscure calculations to find out exact byte array's length
>> we need to allocate largest non-humongous/smallest humongous object.
>> I think it worth to double-check that we calculated right.
>> The first check gets real allocation size (using white box method
>> getObjectSize(Object)) and verifies that allocation was as we expected.
>> If it's not as we expected it's likely a test bug.
>>
>> 2. The second check uses White box method g1IsHumongous(Object) and
>> verifies that objects larger that a half of region are humongous and
>> other object are non-humongous (I believe that is definition for
>> humongous objects).
>>
>
> Okay, I just overlooked that somehow. Then there is only the typo that
> should be fixed.
>
> Thanks,
>    Thomas
>
>



More information about the hotspot-gc-dev mailing list