< prev index next >

src/share/vm/classfile/dictionary.cpp

Print this page

        

*** 175,184 **** --- 175,189 ---- // The loader in this entry is alive. If the klass is dead, // (determined by checking the defining class loader) // the loader must be an initiating loader (rather than the // defining loader). Remove this entry. if (k_def_class_loader_data->is_unloading()) { + ResourceMark rm; + tty->print_cr("loader data %s loads class %s in loader data %s", + loader_data->loader_name(), + ik->name()->as_C_string(), k_def_class_loader_data->loader_name()); + ShouldNotReachHere(); // isn't there a dependency created? or k_loader_data is parent of loader_data?? // If we get here, the class_loader_data must not be the defining // loader, it must be an initiating one. assert(k_def_class_loader_data != loader_data, "cannot have live defining loader and unreachable klass"); // Loader is live, but class and its defining loader are dead.
*** 264,290 **** // Then iterate over the protection domain cache to apply the closure on the // previously marked ones. _pd_cache_table->always_strong_oops_do(blk); } - - void Dictionary::always_strong_classes_do(KlassClosure* closure) { - // Follow all system classes and temporary placeholders in dictionary - for (int index = 0; index < table_size(); index++) { - for (DictionaryEntry* probe = bucket(index); - probe != NULL; - probe = probe->next()) { - Klass* e = probe->klass(); - ClassLoaderData* loader_data = probe->loader_data(); - if (is_strongly_reachable(loader_data, e)) { - closure->do_klass(e); - } - } - } - } - - // Just the classes from defining class loaders void Dictionary::classes_do(void f(Klass*)) { for (int index = 0; index < table_size(); index++) { for (DictionaryEntry* probe = bucket(index); probe != NULL; --- 269,278 ----
*** 329,352 **** // Only the protection domain oops contain references into the heap. Iterate // over all of them. _pd_cache_table->oops_do(f); } - void Dictionary::methods_do(void f(Method*)) { - for (int index = 0; index < table_size(); index++) { - for (DictionaryEntry* probe = bucket(index); - probe != NULL; - probe = probe->next()) { - Klass* k = probe->klass(); - if (probe->loader_data() == k->class_loader_data()) { - // only take klass is we have the entry with the defining class loader - InstanceKlass::cast(k)->methods_do(f); - } - } - } - } - void Dictionary::unlink(BoolObjectClosure* is_alive) { // Only the protection domain cache table may contain references to the heap // that need to be unlinked. _pd_cache_table->unlink(is_alive); } --- 317,326 ----
*** 649,677 **** ProtectionDomainCacheEntry* p = new_entry(hash, protection_domain); Hashtable<oop, mtClass>::add_entry(index, p); return p; } - void ProtectionDomainCacheTable::free(ProtectionDomainCacheEntry* to_delete) { - unsigned int hash = compute_hash(Handle(Thread::current(), to_delete->protection_domain())); - int index = hash_to_index(hash); - - ProtectionDomainCacheEntry** p = bucket_addr(index); - ProtectionDomainCacheEntry* entry = bucket(index); - while (true) { - assert(entry != NULL, "sanity"); - - if (entry == to_delete) { - *p = entry->next(); - Hashtable<oop, mtClass>::free_entry(entry); - break; - } else { - p = entry->next_addr(); - entry = *p; - } - } - } SymbolPropertyTable::SymbolPropertyTable(int table_size) : Hashtable<Symbol*, mtSymbol>(table_size, sizeof(SymbolPropertyEntry)) { } --- 623,632 ----
< prev index next >