Exemple #1
0
NCodeBase* findThing(void* addr) {
  if (Memory->code->stubs->contains(addr)) {
    return findStub(addr);
  } else if (Memory->code->contains(addr)) {
    nmethod* n= nmethod_from_insts((char*)addr);
    assert(isNMethod(n), "not a method");
    return n;
  } else {
    return NULL;
  }
}  
Exemple #2
0
bool OopNCode::verify() {
  bool r = true;
  const char* name = isNMethod() ? "nmethod" : (isCacheStub() ? " PIC" : "count stub");
  NCodeBase::verify2(name);
  if (!rememberLink.verify_list_integrity()) {
    lprintf("\tof rememberLink of %s %#lx\n", name, this);
    r = false;
  }
  
  for (addrDesc* l = locs(); l < locsEnd(); l++) {
    bool ok = isNMethod() ?
      l->verify((nmethod*)this) : l->verify((CacheStub*)this);
    if (! ok) {
      lprintf("\t\tin %s at %#lx\n", name, this);
      r = false;
    } else if (l->isOop() && // not no oops here
               oop(l->referent(this))->is_new() &&
               rememberLink.isEmpty()) {
      error2("%s %#lx should be remembered", name, this);
      r = false;
    }
  }
  return r;
}
Exemple #3
0
void OopNCode::verify() {
  const char* name = isNMethod() ? "nmethod" : (isPIC() ? " PIC" : "count stub");
  NCodeBase::verify2(name);
  // %fixme: Verify via relocIterator
}