RFR(S): 8132717: Add tests checking that instances of j.l.Classes of a large size are allocated as Humongous

Jon Masamitsu jon.masamitsu at oracle.com
Mon Jan 4 23:31:19 UTC 2016


A couple of  minor points.


   78      * @return a class of specified size loaded in specified class loader

Would this be a slightly more accurate comment?

   78      * @return a class with instances of the specified size loaded in specified class loader


The @run

   64  * @run main/othervm -Xms128M -Xmx128M -XX:+UseG1GC -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:.
   65  *                   -XX:G1HeapRegionSize=1M
   66  *                   gc.g1.humongousObjects.TestHumongousNonArrayAllocation TWO_REGION_HUMONGOUS
   67  *
   68  * @run main/othervm -Xms128M -Xmx128M -XX:+UseG1GC -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:.
   69  *                   -XX:G1HeapRegionSize=1M
   70  *                   gc.g1.humongousObjects.TestHumongousNonArrayAllocation MORE_THAN_TWO_REGION_HUMONGOUS

says 2 region and more than 2 region humongous objects are being
created but the comments don't list those.

   78  * the following cases:
   79  * largest non-humongous object (exactly half a region)
   80  * smallest humongous object (half a region + sizeof(long))
   81  * humongous object that takes exactly one region
   82  * the smallest humongous object that takes more than one region (region + sizeof(long)).
   83  *

Since the @run pretty much describes what is being tested, maybe the comments
are not necessary?  But they should be updated if kept.

Otherwise, looks good.



On 01/04/2016 08:54 AM, Kirill Zhaldbybin wrote:
> Hi!
> Could you please review the following test?
> The test generates j.l.Classes with instances of different sizes, 
> compiles,  loads and instantiates them and then checks that instances 
> of size larger than half of G1 region are allocated as Humongous.
> CR:
> https://bugs.openjdk.java.net/browse/JDK-8132717
> Webrev:
> http://cr.openjdk.java.net/~kzhaldyb/webrevs/JDK-8132717/webrev.06/
> Thank you.
> Regards, Kirill

More information about the hotspot-gc-dev mailing list