< prev index next >

src/hotspot/share/classfile/dictionary.cpp

Print this page




 209     LogStream ls(lt);
 210     print_count(&ls);
 211   }
 212 }
 213 
 214 // During class loading we may have cached a protection domain that has
 215 // since been unreferenced, so this entry should be cleared.
 216 void Dictionary::clean_cached_protection_domains(DictionaryEntry* probe) {
 217   assert_locked_or_safepoint(SystemDictionary_lock);
 218 
 219   ProtectionDomainEntry* current = probe->pd_set();
 220   ProtectionDomainEntry* prev = NULL;
 221   while (current != NULL) {
 222     if (current->object_no_keepalive() == NULL) {
 223       LogTarget(Debug, protectiondomain) lt;
 224       if (lt.is_enabled()) {
 225         ResourceMark rm;
 226         // Print out trace information
 227         LogStream ls(lt);
 228         ls.print_cr("PD in set is not alive:");
 229         ls.print("class loader: "); loader_data()->class_loader()->print_value_on(&ls);
 230         ls.print(" loading: "); probe->instance_klass()->print_value_on(&ls);
 231         ls.cr();
 232       }
 233       if (probe->pd_set() == current) {
 234         probe->set_pd_set(current->next());
 235       } else {
 236         assert(prev != NULL, "should be set by alive entry");
 237         prev->set_next(current->next());
 238       }
 239       ProtectionDomainEntry* to_delete = current;
 240       current = current->next();
 241       delete to_delete;
 242     } else {
 243       prev = current;
 244       current = current->next();
 245     }
 246   }
 247 }
 248 
 249 




 209     LogStream ls(lt);
 210     print_count(&ls);
 211   }
 212 }
 213 
 214 // During class loading we may have cached a protection domain that has
 215 // since been unreferenced, so this entry should be cleared.
 216 void Dictionary::clean_cached_protection_domains(DictionaryEntry* probe) {
 217   assert_locked_or_safepoint(SystemDictionary_lock);
 218 
 219   ProtectionDomainEntry* current = probe->pd_set();
 220   ProtectionDomainEntry* prev = NULL;
 221   while (current != NULL) {
 222     if (current->object_no_keepalive() == NULL) {
 223       LogTarget(Debug, protectiondomain) lt;
 224       if (lt.is_enabled()) {
 225         ResourceMark rm;
 226         // Print out trace information
 227         LogStream ls(lt);
 228         ls.print_cr("PD in set is not alive:");
 229         ls.print("class loader: "); oopDesc::print_value_on(&ls, loader_data()->class_loader());
 230         ls.print(" loading: "); probe->instance_klass()->print_value_on(&ls);
 231         ls.cr();
 232       }
 233       if (probe->pd_set() == current) {
 234         probe->set_pd_set(current->next());
 235       } else {
 236         assert(prev != NULL, "should be set by alive entry");
 237         prev->set_next(current->next());
 238       }
 239       ProtectionDomainEntry* to_delete = current;
 240       current = current->next();
 241       delete to_delete;
 242     } else {
 243       prev = current;
 244       current = current->next();
 245     }
 246   }
 247 }
 248 
 249 


< prev index next >