JMC-5596: Full GC detection?

Andrew Azores aazores at
Mon Nov 26 17:14:47 UTC 2018

Hi everyone,

I've been looking at JMC-5596 ( ) and reading some 
background on G1 and CMS (some reading list links below for reference). 
I feel I have a good handle on how JMC's rules work and I've 
successfully put together a prototype new rule and have played around 
with that a fair amount. In doing so I have also dug through the various 
events that can be observed by an Aggregator/IItemConsumer , but I 
haven't been able to determine any useful specific event that indicates 
a Full GC occurrence. From my reading it seems that such an event would 
emit a log message stating ex. "Full GC (GC Cause)" or "Pause Full 
(Allocation Failure), but the two relevant JFR event types 
the Cause field, corresponding to the GcCause enum and G1YCType from the 
OpenJDK JFR sources. I don't know that there is a 1:1 mapping between 
these causes and the Full GC event, however - in other words, AFAIK 
these causes may also be listed for a minor, non-STW collection. The 
other relevant type is Concurrent Mode Failure, which is detectable and 
implies a Full GC for CMS, but these are already handled by the GC Stall 

Is there anyone with some more background in this area who would be 
willing to lend a hand and point me in the right direction? Perhaps I 
simply haven't figured out the right event type to look at yet, or 
perhaps the events I already have found really are 1:1 indicators of a 
full collection with the right cause(s).

Reading list:

Thanks in advance,

Andrew Azores
Software Engineer, OpenJDK Team
Red Hat

More information about the jmc-dev mailing list