RFR 8020467: Inconsistency between usage.getUsed() and isUsageThresholdExceeded() with CMS Old Gen pool

Jaroslav Bachorik jaroslav.bachorik at oracle.com
Tue Oct 22 06:47:41 PDT 2013


Please, review the following test fix:

Issue:  https://bugs.openjdk.java.net/browse/JDK-8020467
Webrev: http://cr.openjdk.java.net/~jbachorik/8020467/webrev.01

The test tries to make sure that the "pool usage threshold" trigger and 
the reported pool memory usage are not contradicting each other. The 
problem is that it is not possible to get the "pool usage threshold 
exceeded" flag and the pool memory usage atomicly in regard to the GC. 
Specifically, when "CMS Old Gen" pool is examined and the usage is 
retrieved before a GC promotes some objects to the old gen but the usage 
threshold is checked after the GC has promoted some instance into the 
old gen the test will fail.

The patch makes sure that there are some instances promoted in  "CMS Old 
Gen" before checking the "pool usage threshold" to get semi-consistent view.

Thanks,

-JB-


More information about the serviceability-dev mailing list