< prev index next >

src/hotspot/share/runtime/frame.inline.hpp

Print this page

        

*** 28,37 **** --- 28,38 ---- #include "code/compiledMethod.inline.hpp" #include "interpreter/bytecodeInterpreter.hpp" #include "interpreter/bytecodeInterpreter.inline.hpp" #include "interpreter/interpreter.hpp" #include "oops/method.hpp" + #include "runtime/continuation.hpp" #include "runtime/frame.hpp" #include "runtime/signature.hpp" #include "utilities/macros.hpp" #ifdef ZERO # include "entryFrame_zero.hpp"
*** 43,70 **** inline bool frame::is_entry_frame() const { return StubRoutines::returns_to_call_stub(pc()); } inline bool frame::is_stub_frame() const { return StubRoutines::is_stub_code(pc()) || (_cb != NULL && _cb->is_adapter_blob()); } inline bool frame::is_first_frame() const { return is_entry_frame() && entry_frame_is_first(); } ! inline oop* frame::oopmapreg_to_location(VMReg reg, const RegisterMap* reg_map) const { ! if(reg->is_reg()) { // If it is passed in a register, it got spilled in the stub frame. return (oop *)reg_map->location(reg); } else { int sp_offset_in_bytes = reg->reg2stack() * VMRegImpl::stack_slot_size; ! return (oop*)(((address)unextended_sp()) + sp_offset_in_bytes); } } inline bool StackFrameStream::is_done() { return (_is_done) ? true : (_is_done = _fr.is_first_frame(), false); } #endif // SHARE_RUNTIME_FRAME_INLINE_HPP --- 44,109 ---- inline bool frame::is_entry_frame() const { return StubRoutines::returns_to_call_stub(pc()); } + inline bool frame::is_deoptimized_frame() const { + assert(_deopt_state != unknown, "not answerable"); + return _deopt_state == is_deoptimized; + } + inline bool frame::is_stub_frame() const { return StubRoutines::is_stub_code(pc()) || (_cb != NULL && _cb->is_adapter_blob()); } inline bool frame::is_first_frame() const { return is_entry_frame() && entry_frame_is_first(); } ! inline bool frame::is_compiled_frame() const { ! if (_cb != NULL && ! _cb->is_compiled() && ! ((CompiledMethod*)_cb)->is_java_method()) { ! return true; ! } ! return false; ! } ! ! template <typename RegisterMapT> ! inline oop* frame::oopmapreg_to_location(VMReg reg, const RegisterMapT* reg_map) const { ! if (reg->is_reg()) { // If it is passed in a register, it got spilled in the stub frame. return (oop *)reg_map->location(reg); } else { int sp_offset_in_bytes = reg->reg2stack() * VMRegImpl::stack_slot_size; ! if (reg_map->in_cont()) { ! return reinterpret_cast<oop*>((uintptr_t)Continuation::usp_offset_to_index(*this, reg_map->as_RegisterMap(), sp_offset_in_bytes)); ! } ! address usp = (address)unextended_sp(); ! assert(reg_map->thread()->is_in_usable_stack(usp), INTPTR_FORMAT, p2i(usp)); ! return (oop*)(usp + sp_offset_in_bytes); } } + inline CodeBlob* frame::get_cb() const { + // if (_cb == NULL) _cb = CodeCache::find_blob(_pc); + if (_cb == NULL) { + int slot; + _cb = CodeCache::find_blob_and_oopmap(_pc, slot); + if (_oop_map == NULL && slot >= 0) { + _oop_map = _cb->oop_map_for_slot(slot, _pc); + } + } + return _cb; + } + + // inline void frame::set_cb(CodeBlob* cb) { + // if (_cb == NULL) _cb = cb; + // assert (_cb == cb, ""); + // assert (_cb->contains(_pc), ""); + // } + inline bool StackFrameStream::is_done() { return (_is_done) ? true : (_is_done = _fr.is_first_frame(), false); } #endif // SHARE_RUNTIME_FRAME_INLINE_HPP
< prev index next >