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

sangheon.kim at oracle.com sangheon.kim at oracle.com
Tue Apr 2 01:14:43 UTC 2019


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