< prev index next >

src/share/vm/classfile/placeholders.cpp

Print this page




 155 // Note: you can be in both placeholders and systemDictionary
 156 // Therefore - must always check SD first
 157 // Ignores the case where entry is not found
 158 void PlaceholderTable::find_and_remove(int index, unsigned int hash,
 159                                        Symbol* name, ClassLoaderData* loader_data,
 160                                        classloadAction action,
 161                                        Thread* thread) {
 162     assert_locked_or_safepoint(SystemDictionary_lock);
 163     PlaceholderEntry *probe = get_entry(index, hash, name, loader_data);
 164     if (probe != NULL) {
 165        probe->remove_seen_thread(thread, action);
 166        // If no other threads using this entry, and this thread is not using this entry for other states
 167        if ((probe->superThreadQ() == NULL) && (probe->loadInstanceThreadQ() == NULL)
 168           && (probe->defineThreadQ() == NULL) && (probe->definer() == NULL)) {
 169          remove_entry(index, hash, name, loader_data);
 170        }
 171     }
 172   }
 173 
 174 PlaceholderTable::PlaceholderTable(int table_size)
 175     : TwoOopHashtable<Symbol*, mtClass>(table_size, sizeof(PlaceholderEntry)) {
 176 }
 177 
 178 #ifndef PRODUCT
 179 // Note, doesn't append a cr
 180 void PlaceholderEntry::print() const {
 181   klassname()->print_value();
 182   if (loader_data() != NULL) {
 183     tty->print(", loader ");
 184     loader_data()->print_value();
 185   }
 186   if (supername() != NULL) {
 187     tty->print(", supername ");
 188     supername()->print_value();
 189   }
 190   if (definer() != NULL) {
 191     tty->print(", definer ");
 192     definer()->print_value();
 193   }
 194   if (instance_klass() != NULL) {
 195     tty->print(", InstanceKlass ");




 155 // Note: you can be in both placeholders and systemDictionary
 156 // Therefore - must always check SD first
 157 // Ignores the case where entry is not found
 158 void PlaceholderTable::find_and_remove(int index, unsigned int hash,
 159                                        Symbol* name, ClassLoaderData* loader_data,
 160                                        classloadAction action,
 161                                        Thread* thread) {
 162     assert_locked_or_safepoint(SystemDictionary_lock);
 163     PlaceholderEntry *probe = get_entry(index, hash, name, loader_data);
 164     if (probe != NULL) {
 165        probe->remove_seen_thread(thread, action);
 166        // If no other threads using this entry, and this thread is not using this entry for other states
 167        if ((probe->superThreadQ() == NULL) && (probe->loadInstanceThreadQ() == NULL)
 168           && (probe->defineThreadQ() == NULL) && (probe->definer() == NULL)) {
 169          remove_entry(index, hash, name, loader_data);
 170        }
 171     }
 172   }
 173 
 174 PlaceholderTable::PlaceholderTable(int table_size)
 175     : Hashtable<Symbol*, mtClass>(table_size, sizeof(PlaceholderEntry)) {
 176 }
 177 
 178 #ifndef PRODUCT
 179 // Note, doesn't append a cr
 180 void PlaceholderEntry::print() const {
 181   klassname()->print_value();
 182   if (loader_data() != NULL) {
 183     tty->print(", loader ");
 184     loader_data()->print_value();
 185   }
 186   if (supername() != NULL) {
 187     tty->print(", supername ");
 188     supername()->print_value();
 189   }
 190   if (definer() != NULL) {
 191     tty->print(", definer ");
 192     definer()->print_value();
 193   }
 194   if (instance_klass() != NULL) {
 195     tty->print(", InstanceKlass ");


< prev index next >