Exemplo n.º 1
0
// Note, doesn't append a cr
void PlaceholderEntry::print() const {
  klassname()->print_value();
  if (loader_data() != NULL) {
    tty->print(", loader ");
    loader_data()->print_value();
  }
  if (supername() != NULL) {
    tty->print(", supername ");
    supername()->print_value();
  }
  if (definer() != NULL) {
    tty->print(", definer ");
    definer()->print_value();
  }
  if (instance_klass() != NULL) {
    tty->print(", InstanceKlass ");
    instance_klass()->print_value();
  }
  tty->print("\n");
  tty->print("loadInstanceThreadQ threads:");
  loadInstanceThreadQ()->printActionQ();
  tty->print("\n");
  tty->print("superThreadQ threads:");
  superThreadQ()->printActionQ();
  tty->print("\n");
  tty->print("defineThreadQ threads:");
  defineThreadQ()->printActionQ();
  tty->print("\n");
}
Exemplo n.º 2
0
  // find_and_add returns probe pointer - old or new
  // If no entry exists, add a placeholder entry
  // If entry exists, reuse entry
  // For both, push SeenThread for classloadAction
  // if havesupername: this is used for circularity for instanceklass loading
PlaceholderEntry* PlaceholderTable::find_and_add(int index, unsigned int hash, symbolHandle name, Handle loader, classloadAction action, symbolHandle supername, Thread* thread) {
  PlaceholderEntry* probe = get_entry(index, hash, name, loader);
  if (probe == NULL) {
    // Nothing found, add place holder
    add_entry(index, hash, name, loader, (action == LOAD_SUPER), supername);
    probe = get_entry(index, hash, name, loader);
  } else {
    if (action == LOAD_SUPER) {
      probe->set_havesupername(true);
      probe->set_supername(supername());
    }
  }
  if (probe) probe->add_seen_thread(thread, action);
  return probe;
}