1.1 --- a/src/share/vm/oops/instanceKlass.cpp Wed Oct 14 16:43:13 2020 +0800 1.2 +++ b/src/share/vm/oops/instanceKlass.cpp Wed Oct 14 17:44:48 2020 +0800 1.3 @@ -78,6 +78,10 @@ 1.4 #ifdef COMPILER1 1.5 #include "c1/c1_Compiler.hpp" 1.6 #endif 1.7 +#if INCLUDE_JFR 1.8 +#include "jfr/jfrEvents.hpp" 1.9 +#endif 1.10 + 1.11 1.12 PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 1.13 1.14 @@ -2529,6 +2533,14 @@ 1.15 1.16 // notify ClassLoadingService of class unload 1.17 ClassLoadingService::notify_class_unloaded(ik); 1.18 + 1.19 +#if INCLUDE_JFR 1.20 + assert(ik != NULL, "invariant"); 1.21 + EventClassUnload event; 1.22 + event.set_unloadedClass(ik); 1.23 + event.set_definingClassLoader(ik->class_loader_data()); 1.24 + event.commit(); 1.25 +#endif 1.26 } 1.27 1.28 void InstanceKlass::release_C_heap_structures(InstanceKlass* ik) {