This page is for capturing the demands and discussing the syntax for the JMC agent. There is a very early prototype currently checked into the JMC repo, but it is currently not being built as part of the JMC product. For information on building and playing around with the prototype, please check core/org.openjdk.jmc.agent/README.md.
Design Goals
- Provide a minimal agent for instrumenting methods with flight recorder events
- Piggybacks on the flight recorder capabilities to provide low overhead event generation, cheap time stamping and the ability for the user to dynamically enable/disable events using normal JFR templates
- Clear and precise syntax
- Minimal overhead (in terms of added code/generated classes)
- Loadable as an agent into an already running runtime (can redefine)
- Controllable through a JMX MBean (perhaps simply an operation taking a new probe definition)
- Must be extremely safe out of the box
- No calling methods (avoiding halting problems) / unexpected exceptions (except when converters enabled)
- No implicit type conversions (boxing of wrapper types to primitive types ok?)
- General catch-all calls to toString(), if at all allowed, must be explicitly enabled
- Built for production use
- Need to have sufficient unit testing
- Need to be tested against larger bodies of code (Oracle can help with Fusion staging and test environments etc)
- Need to support OracleJDK 8 as well as OpenJDK 11+
Stretch Goals
- Annotation driven generation (opt-in, adds the overhead of looking for annotations in all classes)
- Get it into the JDK? (could potentially remove some of the overhead of looking for the annotations )
Non-functional Demands
- Should emit the minimum byte code required for emitting the event
- Should generate the minimum amount of support classes and code required for emitting the event
Links
Overview
Content Tools
ThemeBuilder