Path: blob/master/src/hotspot/share/runtime/frame.inline.hpp
40951 views
/*1* Copyright (c) 1997, 2021, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation.7*8* This code is distributed in the hope that it will be useful, but WITHOUT9* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or10* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License11* version 2 for more details (a copy is included in the LICENSE file that12* accompanied this code).13*14* You should have received a copy of the GNU General Public License version15* 2 along with this work; if not, write to the Free Software Foundation,16* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.17*18* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA19* or visit www.oracle.com if you need additional information or have any20* questions.21*22*/2324#ifndef SHARE_RUNTIME_FRAME_INLINE_HPP25#define SHARE_RUNTIME_FRAME_INLINE_HPP2627#include "runtime/frame.hpp"2829#include "code/compiledMethod.inline.hpp"30#include "interpreter/interpreter.hpp"31#include "oops/method.hpp"32#include "runtime/registerMap.hpp"33#include "runtime/stubRoutines.hpp"34#include "utilities/macros.hpp"35#ifdef ZERO36# include "entryFrame_zero.hpp"37# include "fakeStubFrame_zero.hpp"38# include "interpreterFrame_zero.hpp"39#endif4041#include CPU_HEADER_INLINE(frame)4243inline bool frame::is_entry_frame() const {44return StubRoutines::returns_to_call_stub(pc());45}4647inline bool frame::is_stub_frame() const {48return StubRoutines::is_stub_code(pc()) || (_cb != NULL && _cb->is_adapter_blob());49}5051inline bool frame::is_first_frame() const {52return is_entry_frame() && entry_frame_is_first();53}5455inline bool frame::is_optimized_entry_frame() const {56return _cb != NULL && _cb->is_optimized_entry_blob();57}5859inline address frame::oopmapreg_to_location(VMReg reg, const RegisterMap* reg_map) const {60if(reg->is_reg()) {61// If it is passed in a register, it got spilled in the stub frame.62return reg_map->location(reg);63} else {64int sp_offset_in_bytes = reg->reg2stack() * VMRegImpl::stack_slot_size;65return ((address)unextended_sp()) + sp_offset_in_bytes;66}67}6869inline oop* frame::oopmapreg_to_oop_location(VMReg reg, const RegisterMap* reg_map) const {70return (oop*)oopmapreg_to_location(reg, reg_map);71}7273#endif // SHARE_RUNTIME_FRAME_INLINE_HPP747576