RFR(S): 8132720: Add tests which checks that Humongous objects are not moved after Full GC
Jon Masamitsu
jon.masamitsu at oracle.com
Thu Jan 14 17:52:55 UTC 2016
On 01/14/2016 03:55 AM, Kirill Zhaldybin wrote:
> Jon,
>
> Thank you for reviewing the fix.
>
> Here are a new WebRev:
>
> http://cr.openjdk.java.net/~kzhaldyb/webrevs/JDK-8132720/webrev.03/
Looks good.
My response below.
>
> Could you please read comments inline?
>
> Regards, Kirill
>
> On 04.01.2016 23:00, Jon Masamitsu wrote:
>> Kirill,
>>
>> Generally looks good. Just some minor points.
>>
>> http://cr.openjdk.java.net/~kzhaldyb/webrevs/JDK-8132720/webrev.02/test/gc/g1/humongousObjects/TestHumongousMovement.java.html
>>
>>
>>
>> If you gave the parameter "allocation" a different name, could you
>> avoid having to use the "this" in the constructor? Also, is
>> the "this" needed in isAddressChanged() and printDetails()?
>>
>> 62 public AllocationData(byte[] allocation) {
>> 63 this.allocation = allocation;
>> 64 this.objectAddress = new
>> BigInteger(Long.toUnsignedString((WB.getObjectAddress(this.allocation))));
>>
>> 65 }
> Fixed.
>
>>
>>
>>
>> Is it important to the test that some humongous objects are
>> garbage collected? You could get to this point
>>
>> 118 int toDelete = (int) (allocations.size() *
>> HUMONGOUS_OBJECTS_DELETED_FACTOR);
>>
>>
>> and only have allocated 1 humongous object so toDelete would be 0
>> and none of the humongous objects would be removed at
>>
>> 120 for (int i = 0; i < toDelete; ++i) {
> Since Xmx, Xms and G1HeapRegionSize java options are specified and
> regionsToAllocate = (int) (WB.g1NumFreeRegions() *
> ALLOCATED_HUMONGOUS_REGIONS_FACTOR);
> where ALLOCATED_HUMONGOUS_REGIONS_FACTOR is equal 0.25 I don't think
> it's possible now.
> Do you think it worth to add a sanity check for this case?
No. It's not likely to happen. Just thought I'd mention it
in case you had concerns.
Jon
>
>>
>>
>> Jon
>>
>> On 01/03/2016 03:34 PM, Kirill Zhaldbybin wrote:
>>> Hi!
>>>
>>> Could you please review the following test?
>>>
>>> The test allocates humongous objects, deletes some of them, calls full
>>> gc and checks that reachable humongous objects were not moved.
>>>
>>> CR:
>>> https://bugs.openjdk.java.net/browse/JDK-8132720
>>>
>>> Webrev:
>>> http://cr.openjdk.java.net/~kzhaldyb/webrevs/JDK-8132720/webrev.02/
>>>
>>> Thank you.
>>>
>>> Regards, Kirill
>>
>
More information about the hotspot-gc-dev
mailing list