JMC impact of removing some default event fields

Erik Gahlin erik.gahlin at oracle.com
Fri Mar 13 19:01:36 UTC 2020


Hi,

I’m planning to add a @DefaultFields annotation to Java events. The annotation will allow JDK events to opt out of some of today's default fields (duration, stackTrace and eventThread). Native JFR events already have this capability. 

It will impact the following events:

- ActiveSetting 
- ActiveRecording 
- JavaErrorThrown 
- JavaExceptionThrown 
- SecurityProperty 
- TLSHandshake 
- X509Certificate 
- X509Validation 
- SecurityPropertyModification 
- ExceptionStatistics

For example, ActiveSetting and ExceptionStatistics will not get fields for event thread, duration or stack track as they are only noise for those events. JavaExceptionThrown will not get a duration since it is an instant event.

Will this be a problem for JMC?

I’m reluctant to make the annotation public now as there are plans to support other optional fields, such as “allocated”, “cpuTime”, and “socketRead”, to track metrics between a call to begin() and end(). Those fields will require additional work and I’m not sure @DefaultFields is a powerful enough abstraction to cover all use cases.

För details:

https://bugs.openjdk.java.net/browse/JDK-8239508 <https://bugs.openjdk.java.net/browse/JDK-8239508>

Thanks
Erik




More information about the jmc-dev mailing list