< prev index next >

src/hotspot/share/classfile/systemDictionary.cpp

Print this page

        

*** 45,54 **** --- 45,55 ---- #include "compiler/compileBroker.hpp" #include "gc/shared/gcTraceTime.inline.hpp" #include "gc/shared/oopStorage.inline.hpp" #include "interpreter/bytecodeStream.hpp" #include "interpreter/interpreter.hpp" + #include "jfr/jfr.hpp" #include "jfr/jfrEvents.hpp" #include "logging/log.hpp" #include "logging/logStream.hpp" #include "memory/filemap.hpp" #include "memory/metaspaceClosure.hpp"
*** 81,90 **** --- 82,92 ---- #include "runtime/signature.hpp" #include "services/classLoadingService.hpp" #include "services/diagnosticCommand.hpp" #include "services/threadService.hpp" #include "utilities/macros.hpp" + #include "utilities/ticks.hpp" #if INCLUDE_CDS #include "classfile/systemDictionaryShared.hpp" #endif #if INCLUDE_JVMCI #include "jvmci/jvmciRuntime.hpp"
*** 1849,1862 **** --- 1851,1876 ---- bool unloading_occurred; { GCTraceTime(Debug, gc, phases) t("ClassLoaderData", gc_timer); + #if INCLUDE_JFR + // If unloading occurs, make sure time stamp is consistent. + if (Jfr::is_enabled()) { + InstanceKlass::set_class_unload_time(Ticks::now()); + } + #endif + // First, mark for unload all ClassLoaderData referencing a dead class loader. unloading_occurred = ClassLoaderDataGraph::do_unloading(do_cleaning); if (unloading_occurred) { ClassLoaderDataGraph::clean_module_and_package_info(); + #if INCLUDE_JFR + if (Jfr::is_enabled()) { + Jfr::on_unloading_classes(); + } + #endif } } // TODO: just return if !unloading_occurred. if (unloading_occurred) {
< prev index next >