mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
8202578: Revisit location for class unload events
Use notify_unload_class() to post JFR class unload events instead of doing a separate traversal of the class loader data graph Reviewed-by: lfoltan, coleenp, mgronlun, egahlin
This commit is contained in:
parent
12c27777c8
commit
eb51968f00
3 changed files with 16 additions and 32 deletions
|
@ -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 @@ void InstanceKlass::notify_unload_class(InstanceKlass* ik) {
|
|||
|
||||
// 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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue