RFR: 8238236: Add JFR class redefinition events

Erik Gahlin erik.gahlin at oracle.com
Fri Feb 14 21:21:44 UTC 2020


Could I have a review of three new events that covers class redefinition.

Because work doesn't happen one class at a time, the ClassRedefinition 
event doesn't have a duration. It would be possible to fake an incorrect 
start and end time, so the duration match the amount of work spent on a 
class, but we didn't want to deviate too much from what actually happens 
in the JVM.  It would also require that the time for each subtask is 
measured and aggregated.

If a need for more fine-grained information should arise, it may be 
better to add a dedicated event, i.e. ClassRedefinitionPhase, and create 
a totalWork field in the ClassRedefinition event. This is similar to how 
the GarbageCollection event has a sumOfPauses field and separate 
GCPhasePause event for each pause.

The events are enabled by default, contrary to other class related 
events. The rationale is that redefinition doesn't happen that often and 
that the information is more useful for troubleshooting, for example 
what caused a deoptimization or if the JVM crashes due to class being 



tier1,tier2 + test/jdk/jdk/jfr


More information about the hotspot-jfr-dev mailing list