Flight Recorder exposes an Event API, which allows to generate custom events.
Apparently the performance impact of these events is close to nothing when the related Events are not enabled.
Some references: - * [ http://hirt.se/blog/?p=444 |http://hirt.se/blog/?p=444] * [https://github.com/rh - jmc-team/jmc-robots-demo| https://github.com/rh-jmc-team/jmc-robots-demo ]
The JFR API required JDK11, but the OpenJDK team at Red Hat is working on some kind of backport to make it easier for libraries which also need compatibility with JDK8. |
|