src/share/vm/classfile/classLoaderData.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File 8067713 Cdiff src/share/vm/classfile/classLoaderData.cpp

src/share/vm/classfile/classLoaderData.cpp

Print this page

        

*** 783,803 **** // mark metadata seen on the stack and code cache so we can delete unneeded entries. bool has_redefined_a_class = JvmtiExport::has_redefined_a_class(); MetadataOnStackMark md_on_stack(has_redefined_a_class); if (has_redefined_a_class) { - // purge_previous_versions also cleans weak method links. Because - // one method's MDO can reference another method from another - // class loader, we need to first clean weak method links for all - // class loaders here. Below, we can then free redefined methods - // for all class loaders. for (ClassLoaderData* data = _head; data != NULL; data = data->next()) { data->classes_do(InstanceKlass::purge_previous_versions); } } ! // Need to purge the previous version before deallocating. free_deallocate_lists(); } void ClassLoaderDataGraph::purge() { assert(SafepointSynchronize::is_at_safepoint(), "must be at safepoint!"); --- 783,798 ---- // mark metadata seen on the stack and code cache so we can delete unneeded entries. bool has_redefined_a_class = JvmtiExport::has_redefined_a_class(); MetadataOnStackMark md_on_stack(has_redefined_a_class); if (has_redefined_a_class) { for (ClassLoaderData* data = _head; data != NULL; data = data->next()) { data->classes_do(InstanceKlass::purge_previous_versions); } } ! // Should purge the previous version before deallocating. free_deallocate_lists(); } void ClassLoaderDataGraph::purge() { assert(SafepointSynchronize::is_at_safepoint(), "must be at safepoint!");
*** 831,842 **** #endif } void ClassLoaderDataGraph::free_deallocate_lists() { for (ClassLoaderData* cld = _head; cld != NULL; cld = cld->next()) { - // We need to keep this data until InstanceKlass::purge_previous_version has been - // called on all alive classes. See the comment in ClassLoaderDataGraph::clean_metaspaces. cld->free_deallocate_list(); } } // CDS support --- 826,835 ----
src/share/vm/classfile/classLoaderData.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File