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

Thomas Schatzl thomas.schatzl at oracle.com
Mon Aug 24 09:53:17 UTC 2015

Hi Kirill,

On Thu, 2015-08-20 at 19:45 +0300, Kirill Zhaldybin wrote:
> Hi!
> Could you please review a new simple test checking that only objects 
> allocating more than  a half regions are allocated as humongous?
> CR:
> https://bugs.openjdk.java.net/browse/JDK-8132708
> Webrev:
> hotspot:
> http://cr.openjdk.java.net/~kzhaldyb/webrevs/JDK-8132708/webrev.03/
> Tests:
> jprt


 - 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.


More information about the hotspot-gc-dev mailing list