--- a/src/hotspot/share/oops/instanceKlass.cpp Tue Aug 28 09:06:23 2018 +0200
+++ b/src/hotspot/share/oops/instanceKlass.cpp Tue Aug 28 10:10:11 2018 -0400
@@ -80,6 +80,10 @@
#ifdef COMPILER1
#include "c1/c1_Compiler.hpp"
#endif
+#if INCLUDE_JFR
+#include "jfr/jfrEvents.hpp"
+#endif
+
#ifdef DTRACE_ENABLED
@@ -2423,6 +2427,14 @@
// notify ClassLoadingService of class unload
ClassLoadingService::notify_class_unloaded(ik);
+
+#if INCLUDE_JFR
+ assert(ik != NULL, "invariant");
+ EventClassUnload event;
+ event.set_unloadedClass(ik);
+ event.set_definingClassLoader(ik->class_loader_data());
+ event.commit();
+#endif
}
void InstanceKlass::release_C_heap_structures(InstanceKlass* ik) {