Exemplo n.º 1
0
frame frame::sender_for_entry_frame(RegisterMap *map) const {
  assert(zeroframe()->is_entry_frame(), "wrong type of frame");
  assert(map != NULL, "map must be set");
  assert(!entry_frame_is_first(), "next Java fp must be non zero");
  assert(entry_frame_call_wrapper()->anchor()->last_Java_sp() == sender_sp(),
         "sender should be next Java frame");
  map->clear();
  assert(map->include_argument_oops(), "should be set by clear");
  return frame(zeroframe()->next(), sender_sp());
}
inline frame::frame(intptr_t* sp, intptr_t* fp) {
  _sp = sp;
  _fp = fp;
  switch (zeroframe()->type()) {
  case ZeroFrame::ENTRY_FRAME:
    _pc = StubRoutines::call_stub_return_pc();
    _cb = NULL;
    break;

  case ZeroFrame::INTERPRETER_FRAME:
    _pc = NULL;
    _cb = NULL;
    break;

  case ZeroFrame::SHARK_FRAME:
    _pc = zero_sharkframe()->pc();
    _cb = CodeCache::find_blob_unsafe(pc());
    break;

  case ZeroFrame::FAKE_STUB_FRAME:
    _pc = NULL;
    _cb = NULL;
    break;

  default:
    ShouldNotReachHere();
  }
  _deopt_state = not_deoptimized;
}
Exemplo n.º 3
0
void frame::patch_pc(Thread* thread, address pc) {

  if (pc != NULL) {
    _cb = CodeCache::find_blob(pc);
    SharkFrame* sharkframe = zeroframe()->as_shark_frame();
    sharkframe->set_pc(pc);
    _pc = pc;
    _deopt_state = is_deoptimized;

  } else {
    // We borrow this call to set the thread pointer in the interpreter
    // state; the hook to set up deoptimized frames isn't supplied it.
    assert(pc == NULL, "should be");
    get_interpreterState()->set_thread((JavaThread *) thread);
  }
}
Exemplo n.º 4
0
inline frame::frame(ZeroFrame* zf, intptr_t* sp) {
    _zeroframe = zf;
    _sp = sp;
    switch (zeroframe()->type()) {
    case ZeroFrame::ENTRY_FRAME:
        _pc = StubRoutines::call_stub_return_pc();
        _cb = NULL;
        _deopt_state = not_deoptimized;
        break;

    case ZeroFrame::INTERPRETER_FRAME:
        _pc = NULL;
        _cb = NULL;
        _deopt_state = not_deoptimized;
        break;

    case ZeroFrame::SHARK_FRAME: {
        _pc = zero_sharkframe()->pc();
        _cb = CodeCache::find_blob_unsafe(pc());
        address original_pc = nmethod::get_deopt_original_pc(this);
        if (original_pc != NULL) {
            _pc = original_pc;
            _deopt_state = is_deoptimized;
        } else {
            _deopt_state = not_deoptimized;
        }
        break;
    }
    case ZeroFrame::FAKE_STUB_FRAME:
        _pc = NULL;
        _cb = NULL;
        _deopt_state = not_deoptimized;
        break;

    default:
        ShouldNotReachHere();
    }
}
Exemplo n.º 5
0
frame frame::sender_for_nonentry_frame(RegisterMap *map) const {
  assert(zeroframe()->is_interpreter_frame() ||
         zeroframe()->is_shark_frame() ||
         zeroframe()->is_fake_stub_frame(), "wrong type of frame");
  return frame(zeroframe()->next(), sender_sp());
}
Exemplo n.º 6
0
bool frame::is_fake_stub_frame() const {
  return zeroframe()->is_fake_stub_frame();
}
Exemplo n.º 7
0
bool frame::is_interpreted_frame() const {
  return zeroframe()->is_interpreter_frame();
}
inline intptr_t* frame::sender_sp() const {
  return (intptr_t *) zeroframe()->next();
}
inline intptr_t* frame::unextended_sp() const {
  if (zeroframe()->is_shark_frame())
    return zero_sharkframe()->unextended_sp();
  else
    return (intptr_t *) -1;
}