Some notes on the implementation of the Agent.
- We may need to add to make the jdk.jfr module readable from the module of the instrumented class. We should probably get the module of the class loader class provided by the transformation method, and see if can read the jdk.jfr module, if not, fix the problem with Instrumentation#redefineModule
- We do no longer have Unsafe#defineClass to define the event classes on the fly. There is a workaround though, in jdk.internal.misc.Unsafe#defineClass. This solution, however, requires --add-exports java.base/jdk.internal.misc=ALL-UNNAMED but perhaps that is okay for now.
See https://bugs.openjdk.java.net/browse/JDK-8205386 for a possible replacement.