Example #1
0
nmethod* nmethod::nmethodContaining(char* pc, char* likelyEntryPoint) {
  assert(Memory->code->contains(pc), "should contain address");
  if (likelyEntryPoint && Memory->code->contains(likelyEntryPoint)) {
    nmethod* result = nmethod_from_insts(likelyEntryPoint);
    if (result->contains(pc)) return result;
  }
  return findNMethod(pc);
}
Example #2
0
// NB: get_method() is not quite equivalent to target(): the former returns
// an nmethod even when it is called via a count stub, the latter returns
// NULL in this case.
// It can also be called on dummy sendDescs representing glue code
nmethod* sendDesc::get_method() {
  char *addr= jump_addr();
  if (Memory->code->contains(addr)) return nmethod_from_insts(addr);
  if (!Memory->code->stubs->contains(addr)) return NULL;
  NCodeBase *n= findStub(addr);
  assert(n->isCountStub(), "shouldn't call on PICs");
  return ((CountStub*)n)->target();
}
Example #3
0
NCodeBase* findThing(void* addr) {
  if (Universe::code->contains(addr)) {
    nmethod* n = (nmethod*)nmethod_from_insts((char*)addr);
    return n;
  } else {
    return NULL;
  }
}  
Example #4
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;
  }
}  
Example #5
0
nmethod* sendDesc::target() {
  char* addr = jump_addr();
  return Memory->code->contains(addr) ? nmethod_from_insts(addr) : NULL;
}