< prev index next >

src/hotspot/share/runtime/safepoint.cpp

Print this page

        

*** 21,31 **** * questions. * */ #include "precompiled.hpp" ! #include "classfile/classLoaderData.hpp" #include "classfile/stringTable.hpp" #include "classfile/symbolTable.hpp" #include "classfile/systemDictionary.hpp" #include "code/codeCache.hpp" #include "code/icBuffer.hpp" --- 21,31 ---- * questions. * */ #include "precompiled.hpp" ! #include "classfile/classLoaderData.inline.hpp" #include "classfile/stringTable.hpp" #include "classfile/symbolTable.hpp" #include "classfile/systemDictionary.hpp" #include "code/codeCache.hpp" #include "code/icBuffer.hpp"
*** 718,727 **** --- 718,728 ---- ClassLoaderDataGraph::resize_if_needed(); if (event.should_commit()) { post_safepoint_cleanup_task_event(&event, name); } } + _subtasks.all_tasks_completed(_num_workers); } }; // Various cleaning tasks that should be done periodically at safepoints.
*** 747,758 **** --- 748,769 ---- ParallelSPCleanupTask cleanup(1, &deflate_counters); StrongRootsScope srs(1); cleanup.work(0); } + // Needs to be done single threaded by the VMThread. This walks + // the thread stacks looking for references to metadata before + // deciding to remove it from the metaspaces. + if (ClassLoaderDataGraph::should_clean_metaspaces()) { + const char* name = "cleanup live ClassLoaderData metaspaces"; + TraceTime timer(name, TRACETIME_LOG(Info, safepoint, cleanup)); + ClassLoaderDataGraph::walk_metadata_and_clean_metaspaces(); + } + // Finish monitor deflation. ObjectSynchronizer::finish_deflate_idle_monitors(&deflate_counters); + } bool SafepointSynchronize::safepoint_safe(JavaThread *thread, JavaThreadState state) { switch(state) {
< prev index next >