RFR: 8003216: Add JFR event indicating explicit System.gc() cal

Per Liden per.liden at oracle.com
Wed Feb 26 12:56:45 UTC 2020


Hi Erik,

On 2020-02-26 13:50, Erik Gahlin wrote:
> Hi,
> 
> Could I have a review of a JFR event that is emitted when System.gc() is 
> called.
> 
> Purpose is to collect the stack trace. It is not sufficient with the 
> cause field that the GarbageCollection event has today.
> 
> Bug:
> https://bugs.openjdk.java.net/browse/JDK-8003216
> 
> Webrev:
> http://cr.openjdk.java.net/~egahlin/8003216/

  489     EventSystemGC event;
  490     event.commit();
  491     Universe::heap()->collect(GCCause::_java_lang_system_gc);

Don't you want the commit() call after the call to collect(), to get the 
timing right?

cheers,
Per

> 
> Testing:
> tier1+tier2+jdk/jdk/jfr
> 
> Thanks
> Erik
> 
> 


More information about the hotspot-gc-dev mailing list