-
Enhancement
-
Resolution: Fixed
-
P3
-
11, 12
-
b18
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8223283 | 11.0.5-oracle | Erik Gahlin | P3 | Resolved | Fixed | b01 |
JDK-8225732 | 11.0.5 | Erik Gahlin | P3 | Resolved | Fixed | b01 |
The methods will be empty, just like they are for jdk.jfr.Event, but when the subclass is loaded the JVM, or code in jdk.jfr module, will add the bytecode needed to write that event into the JFR buffers. Labels, descriptions etc. for the event that require a dependency on annotation classes in jdk.jfr can be defined in a mirror class in jdk.jfr.events package. Example,
-------------------------- java.base -----------------------------------------------
package jdk.internal.events;
class HelloWorld extends jdk.internal.events.Event {
public String message;
]
-------------------------- jdk.jfr -----------------------------------------------
package jdk.jfr.events;
@Name("jdk.HelloWorld")
@Label("Hell World")
@Description("Helps the programmer getting started");
@StackTrace(false)
@Enabled(false)
@MirrorEvent(className="jdk.internal.events.HelloWorld")
class HelloWorld extends jdk.jfr.Event {
@Label("Message)"
@Description("A fine message")
public message;
}
-------------------------------------------------------------------------
To ensure that fields are matching, there will be a check when the event is registered. if they don't match, an InternalError will be thrown to ensure such code is never checked in.
If other JDK modules in the future would run into similar problems, it would be possible to export the java,base/jdk.internal.events package to that module and they could also avoid the dependency on the JFR module. Since the methods of jdk.internal.events.Event are empty, all traces of JFR will be eliminated by the JIT if JFR is not present.
- backported by
-
JDK-8223283 Produce events in the JDK without a dependency on jdk.jfr
-
- Resolved
-
-
JDK-8225732 Produce events in the JDK without a dependency on jdk.jfr
-
- Resolved
-
- blocks
-
JDK-8148188 Enhance the security libraries to record events of interest
-
- Resolved
-
- relates to
-
JDK-8213172 CDS and JFR tests fail with assert(JdkJfrEvent::is(klass)) failed: invariant
-
- Resolved
-
-
JDK-8219205 JFR file without license header
-
- Resolved
-
-
JDK-8214161 java.lang.IllegalAccessError: class jdk.internal.event.X509CertificateEvent (in module java.base) cannot access class jdk.jfr.internal.handlers.EventHandler (in module jdk.jfr) because module java.base does not read module jdk.jfr
-
- Closed
-
-
JMC-5561 Support for Crypto Events in JMC
-
- Open
-