< prev index next >

src/hotspot/share/oops/instanceKlass.cpp

   }
   return id;
 }
 
 inline DependencyContext InstanceKlass::dependencies() {
-  DependencyContext dep_context(&_dep_context);
+  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,12 +2121,16 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); +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,14 +2142,10 #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()) {
@@ -2326,11 +2326,11 } // 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(_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,11 +2471,11 if (jmeths != (jmethodID*)NULL) { release_set_methods_jmethod_ids(NULL); FreeHeap(jmeths); } - assert(_dep_context == DependencyContext::EMPTY, + assert(_dep_context == NULL, "dependencies should already be cleaned"); #if INCLUDE_JVMTI // Deallocate breakpoint records if (breakpoints() != 0x0) {
< prev index next >