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

Martin Buchholz martinrb at google.com
Thu Oct 31 00:08:31 PDT 2013


On Wed, Oct 30, 2013 at 11:32 PM, Staffan Larsen
<staffan.larsen at oracle.com>wrote:

> Quoting Bengt from earlier in this conversation:
>
> "As for just doing a System.gc() to force a GC I think you can rely on
> that System.gc() does a full GC in Hotspot unless someone sets
> -XX:+DisableExplicitGC on the command line. Considering that you are
> relying on Hotspot specifc names for pools I don't think it is a limitation
> to the test to rely on the Hotspot implementatoin of System.gc()."
>
>
A full synchronous gc is a stronger condition than a full gc.


> The spec for System.gc() doesn't promising anything, but all the
> collectors in Hotspot are implemented to do a full GC when System.gc() is
> called.
>
>
I'm not a GC expert and I have no proof, but that is not my understanding.
 I believe that a concurrent gc (CMS) remains concurrent even if initiated
by System.gc().


Hmmm.... checking hotspot flags I see:

java -XX:+PrintFlagsFinal
     bool ExplicitGCInvokesConcurrent               = false
{product}
     bool ExplicitGCInvokesConcurrentAndUnloadsClasses  = false
{product}
which suggests you are right for default gc operation.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/serviceability-dev/attachments/20131031/bc3723e0/attachment-0001.html 


More information about the serviceability-dev mailing list