RFR(M): 8218049: Survivor MemoryMXBean used() size granularity is region based

sangheon.kim at oracle.com sangheon.kim at oracle.com
Wed Apr 3 08:05:34 UTC 2019


Hi all,

Here's the second webrev which includes some recommendations from Thomas:
1) Fixing memory ordering issue
2) Changing how G1SurvivorRegions collect data.
3) Some minor refactoring.

http://cr.openjdk.java.net/~sangheki/8218049/webrev.1
http://cr.openjdk.java.net/~sangheki/8218049/webrev.1_inc_0/
Testing: hs-tier 1 ~ 5, survivorAlignment/* tests

Thanks,
Sangheon


On 4/1/19 6:14 PM, sangheon.kim at oracle.com wrote:
> Hi all,
>
> Can I have some reviews for the patch fixes calculation of used bytes 
> at MemoryMXBeans for G1?
>
> The problem is that used bytes of MemoryMXBeans(MemoryUsage) was 
> calculated from 'region size * region count' which really doesn't 
> reflect the real used size.
> So proposed patch calculates from sum of used bytes of 
> mutator/survivor regions when those are retired.
> This CR and its friends are long lasting issues and added to problem 
> list.
>
> During discussion with Thomas Schatzl, he also pointed 'old gen 
> committed' seems wrong. So I filed another CR, JDK-8221790:
> Old gen committed size should calculated from used region count.
>
> This CR is blocking JDK-8220089: G1 wastes a significant amount of 
> space in survivor regions.
> The patch is based on JDK-8218668: Clean up evacuation of optional 
> collection set.
>
> CR: https://bugs.openjdk.java.net/browse/JDK-8218049
> webrev: http://cr.openjdk.java.net/~sangheki/8218049/webrev.0/
> Testing: hs-tier1 ~ 5, 100 iterations of jtreg/gc/survivorAlignment/* 
> tests on each Linux,Mac,Windows and Solaris.
>
> Thanks,
> Sangheon




More information about the hotspot-gc-dev mailing list