RFR(S): 8132720: Add tests which checks that Humongous objects are not moved after Full GC

Jon Masamitsu jon.masamitsu at oracle.com
Mon Jan 4 20:00:14 UTC 2016


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         }



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) {


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