-XX:+PrintClassHistogram Does a FullGC even with CMS enabled and -XX:+ExplicitGCInvokesConcurrent ?

Srinivas Ramakrishna ysr1729 at gmail.com
Wed Apr 2 18:41:58 UTC 2014


Hi Matt --

It's been a while since we talked; great to hear from you.

As regards the behaviour of +PrintClassHistogram, I don't recall that
interpretation ever having been implemented,
and definitely not in the CR that you reference below.

+PrintClassHistogram will do an explicit stop-world full gc, even with CMS,
then produce a class histogram.

What the description in the CR you pointed to below is saying is that,
PrintClassHistogramBefore/AfterFullGC
will not produce a histogram at the end of a concurrent gc cycle.

However, it will at the end of a stop-world full gc cycle.

That having been said, I do not think it's a good idea to change the
interpretation of the SIGQUIT related
+PrintClassHistogram depending on the GC in question. It looks like what
you want here is the ability to
get a class histogram after a concurrent gc cycle when presented with a
SIGQUIT. (There's also the
question of whether the same behaviour should also apply to jmap
-heap:live.)

I think a change in behaviour along the lines of yr suggestion requires
discussion by users of concurrent gc's
to see if that is desirable and secondly whether both kinds of behaviours
should be available (i.e. the current one,
as well as an optional "concurrent" one).

thanks!
-- ramki


On Wed, Apr 2, 2014 at 10:43 AM, Matt Miller
<matthew.miller at forgerock.com>wrote:

>  Hi All,
>
> It seems to me that even with 7 (Tested both u45 and u51)  the title holds
> true.
> I would expect with ConcMarkSweep enabled, and ExplicitGCInvokesConcurrent
> that -XX:+PrintClassHistogram would NOT do a FullGC, but instead start a
> CMS cycle.
> I thought maybe this was addressed by
> http://bugs.java.com/view_bug.do?bug_id=6797870
>
> But I suppose this is not correct?
>
> Is there a bug to fix PrintClassHistogram when using CMS?
> Perhaps I am just not finding the correct bug number?
>
> And of course even -XX:+DisableExplicitGC does not help...
>
> Example:
> jconsole -J-Xloggc:/Users/mmiller/gc.log -J-XX:+UseConcMarkSweepGC
> -J-XX:+PrintGCDetails -J-XX:+ExplicitGCInvokesConcurrent
> -J-XX:+PrintClassHistogram &
> [1] 10759
> $ kill -3 10759
> $ cat gc.log
>
> <output snipped>
>
> 19.169: [Full GC19.169: [CMS: 5620K->6303K(7776K), 0.0338410 secs]
> 6950K->6303K(10208K), [CMS Perm : 13492K->13487K(21248K)], 0.0340110 secs]
> [Times: user=0.04 sys=0.00, real=0.03 secs]
>
>  num     #instances         #bytes  class name
> ----------------------------------------------
>
> <snip>
>
>
>
> _______________________________________________
> hotspot-gc-use mailing list
> hotspot-gc-use at openjdk.java.net
> http://mail.openjdk.java.net/mailman/listinfo/hotspot-gc-use
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/hotspot-gc-use/attachments/20140402/c696a5e4/attachment.html>


More information about the hotspot-gc-use mailing list