RFR (S): 8152724: Sum of Eden, survivor and old capacity may be larger than heap size

Stefan Johansson stefan.johansson at oracle.com
Tue Dec 11 10:11:47 UTC 2018



On 2018-11-29 15:26, Thomas Schatzl wrote:
> Hi all,
> 
>    can I have reviews for this small change that fixes some bug in
> determining the "correct" number of maximum survivor regions for the
> current GC?
> 
> Currently the maximum survivor regions are calculated directly from
> maximum eden size divided by SurvivorRatio. If the eden is large, and
> SurvivorRatio small, this could result in strange log output indicating
> that there is more space in the Java heap available than there
> actually is space :)
> 
> Of course this is not true, and in reality the GC would go into an
> evacuation failure before allocating that many regions, but
> nevertheless the output is incorrect.
> 
> This change limits the internal max survivor size variable used for
> printing to the amount of free space.
> 
> CR:
> https://bugs.openjdk.java.net/browse/JDK-8152724
> Webrev:
> http://cr.openjdk.java.net/~tschatzl/8152724/webrev/
Looks good,
StefanJ

> Testing:
> new test, hs-tier1-3
> 
> Thanks,
>    Thomas
> 



More information about the hotspot-gc-dev mailing list