< prev index next >

src/hotspot/share/oops/instanceKlass.cpp


*** 2109,2119 **** } return id; } inline DependencyContext InstanceKlass::dependencies() { ! DependencyContext dep_context(&_dep_context); return dep_context; } int InstanceKlass::mark_dependent_nmethods(KlassDepChange& changes) { return dependencies().mark_dependent_nmethods(changes); --- 2109,2119 ---- } return id; } inline DependencyContext InstanceKlass::dependencies() { ! DependencyContext dep_context(&_dep_context, &_dep_context_last_cleaned); return dep_context; } int InstanceKlass::mark_dependent_nmethods(KlassDepChange& changes) { return dependencies().mark_dependent_nmethods(changes); ***************
*** 2121,2132 **** void InstanceKlass::add_dependent_nmethod(nmethod* nm) { dependencies().add_dependent_nmethod(nm); } ! void InstanceKlass::remove_dependent_nmethod(nmethod* nm, bool delete_immediately) { ! dependencies().remove_dependent_nmethod(nm, delete_immediately); } #ifndef PRODUCT void InstanceKlass::print_dependent_nmethods(bool verbose) { dependencies().print_dependent_nmethods(verbose); --- 2121,2136 ---- void InstanceKlass::add_dependent_nmethod(nmethod* nm) { dependencies().add_dependent_nmethod(nm); } ! void InstanceKlass::remove_dependent_nmethod(nmethod* nm) { ! dependencies().remove_dependent_nmethod(nm); ! } ! ! void InstanceKlass::clean_dependency_context() { ! dependencies().clean_unloading_dependents(); } #ifndef PRODUCT void InstanceKlass::print_dependent_nmethods(bool verbose) { dependencies().print_dependent_nmethods(verbose); ***************
*** 2138,2151 **** #endif //PRODUCT void InstanceKlass::clean_weak_instanceklass_links() { clean_implementors_list(); clean_method_data(); - - // Since GC iterates InstanceKlasses sequentially, it is safe to remove stale entries here. - DependencyContext dep_context(&_dep_context); - dep_context.expunge_stale_entries(); } void InstanceKlass::clean_implementors_list() { assert(is_loader_alive(), "this klass should be live"); if (is_interface()) { --- 2142,2151 ---- ***************
*** 2326,2336 **** } // These are not allocated from metaspace, but they should should all be empty // during dump time, so we don't need to worry about them in InstanceKlass::iterate(). guarantee(_source_debug_extension == NULL, "must be"); ! guarantee(_dep_context == DependencyContext::EMPTY, "must be"); guarantee(_osr_nmethods_head == NULL, "must be"); #if INCLUDE_JVMTI guarantee(_breakpoints == NULL, "must be"); guarantee(_previous_versions == NULL, "must be"); --- 2326,2336 ---- } // These are not allocated from metaspace, but they should should all be empty // during dump time, so we don't need to worry about them in InstanceKlass::iterate(). guarantee(_source_debug_extension == NULL, "must be"); ! guarantee(_dep_context == NULL, "must be"); guarantee(_osr_nmethods_head == NULL, "must be"); #if INCLUDE_JVMTI guarantee(_breakpoints == NULL, "must be"); guarantee(_previous_versions == NULL, "must be"); ***************
*** 2471,2481 **** if (jmeths != (jmethodID*)NULL) { release_set_methods_jmethod_ids(NULL); FreeHeap(jmeths); } ! assert(_dep_context == DependencyContext::EMPTY, "dependencies should already be cleaned"); #if INCLUDE_JVMTI // Deallocate breakpoint records if (breakpoints() != 0x0) { --- 2471,2481 ---- if (jmeths != (jmethodID*)NULL) { release_set_methods_jmethod_ids(NULL); FreeHeap(jmeths); } ! assert(_dep_context == NULL, "dependencies should already be cleaned"); #if INCLUDE_JVMTI // Deallocate breakpoint records if (breakpoints() != 0x0) {
< prev index next >