RFR: 8138705: Kitchen sink stress test fails

Max Ockner max.ockner at oracle.com
Fri May 13 19:39:31 UTC 2016


Hello,
Please review this fix which allows NMT to handle overlapping commits.

Though it would make sense to uncommit space before committing over it,  
this is not always the way things are done. Kitchensink encounters some 
intentional overlapping commits in gc, which previously would cause NMT 
to throw an assert. Now, these overlapping commits are handled by 
recording an uncommit of the newly committed region before recording the 
commit. This effectively chops any of the already-committed space off of 
the existing committed region before adding the new commit.  In order 
for this all to work, ReservedMemoryRegion::remove_uncommitted_region 
was changed to support uncommitting an arbitrary region. The target 
behavior of this operation is to truncate (or split) committed regions 
which overlap with the region being uncommitted, while only subtracting 
from the total  the amount of memory which was actually cleared.

Bug:  https://bugs.openjdk.java.net/browse/JDK-8138705
Webrev:  http://cr.openjdk.java.net/~mockner/8138705/

Tested with jtreg NMT tests. Survived 72 hours of Kitchensink.
Added a test: runtime/NMT/CommitOverlappingRegions.java
This test performs various commits and uncommits that overlap in 
different ways, and checks that it computes the amount of committed 
space correctly.

Thanks,
Max


More information about the hotspot-runtime-dev mailing list