Path: blob/master/src/hotspot/cpu/zero/frame_zero.inline.hpp
64440 views
/*1* Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.2* Copyright 2007, 2008, 2009, 2010 Red Hat, Inc.3* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.4*5* This code is free software; you can redistribute it and/or modify it6* under the terms of the GNU General Public License version 2 only, as7* published by the Free Software Foundation.8*9* This code is distributed in the hope that it will be useful, but WITHOUT10* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or11* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License12* version 2 for more details (a copy is included in the LICENSE file that13* accompanied this code).14*15* You should have received a copy of the GNU General Public License version16* 2 along with this work; if not, write to the Free Software Foundation,17* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.18*19* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA20* or visit www.oracle.com if you need additional information or have any21* questions.22*23*/2425#ifndef CPU_ZERO_FRAME_ZERO_INLINE_HPP26#define CPU_ZERO_FRAME_ZERO_INLINE_HPP2728#include "code/codeCache.hpp"2930// Constructors3132inline frame::frame() {33_zeroframe = NULL;34_sp = NULL;35_pc = NULL;36_cb = NULL;37_deopt_state = unknown;38}3940inline address frame::sender_pc() const { ShouldNotCallThis(); return NULL; }4142inline frame::frame(ZeroFrame* zf, intptr_t* sp) {43_zeroframe = zf;44_sp = sp;45switch (zeroframe()->type()) {46case ZeroFrame::ENTRY_FRAME:47_pc = StubRoutines::call_stub_return_pc();48_cb = NULL;49_deopt_state = not_deoptimized;50break;5152case ZeroFrame::INTERPRETER_FRAME:53_pc = NULL;54_cb = NULL;55_deopt_state = not_deoptimized;56break;5758case ZeroFrame::FAKE_STUB_FRAME:59_pc = NULL;60_cb = NULL;61_deopt_state = not_deoptimized;62break;6364default:65ShouldNotReachHere();66}67}6869// Accessors7071inline intptr_t* frame::sender_sp() const {72return fp() + 1;73}7475inline intptr_t* frame::real_fp() const {76return fp();77}7879inline intptr_t* frame::link() const {80ShouldNotCallThis();81return NULL;82}8384inline intptr_t* frame::link_or_null() const {85ShouldNotCallThis();86return NULL;87}8889inline interpreterState frame::get_interpreterState() const {90return zero_interpreterframe()->interpreter_state();91}9293inline intptr_t** frame::interpreter_frame_locals_addr() const {94return &(get_interpreterState()->_locals);95}9697inline intptr_t* frame::interpreter_frame_bcp_addr() const {98return (intptr_t*) &(get_interpreterState()->_bcp);99}100101inline ConstantPoolCache** frame::interpreter_frame_cache_addr() const {102return &(get_interpreterState()->_constants);103}104105inline Method** frame::interpreter_frame_method_addr() const {106return &(get_interpreterState()->_method);107}108109inline oop* frame::interpreter_frame_mirror_addr() const {110return &(get_interpreterState()->_mirror);111}112113inline intptr_t* frame::interpreter_frame_mdp_addr() const {114fatal("Should not call this: Zero never profiles");115return NULL; // silence compiler warnings116}117118inline intptr_t* frame::interpreter_frame_tos_address() const {119return get_interpreterState()->_stack + 1;120}121122inline oop* frame::interpreter_frame_temp_oop_addr() const {123interpreterState istate = get_interpreterState();124return (oop *)&istate->_oop_temp;125}126127inline int frame::interpreter_frame_monitor_size() {128return BasicObjectLock::size();129}130131inline intptr_t* frame::interpreter_frame_expression_stack() const {132intptr_t* monitor_end = (intptr_t*) interpreter_frame_monitor_end();133return monitor_end - 1;134}135136// Return a unique id for this frame. The id must have a value where137// we can distinguish identity and younger/older relationship. NULL138// represents an invalid (incomparable) frame.139inline intptr_t* frame::id() const {140return fp();141}142143inline JavaCallWrapper** frame::entry_frame_call_wrapper_addr() const {144return zero_entryframe()->call_wrapper();145}146147inline void frame::set_saved_oop_result(RegisterMap* map, oop obj) {148ShouldNotCallThis();149}150151inline oop frame::saved_oop_result(RegisterMap* map) const {152ShouldNotCallThis();153return NULL;154}155156inline bool frame::is_older(intptr_t* id) const {157ShouldNotCallThis();158return false;159}160161inline intptr_t* frame::entry_frame_argument_at(int offset) const {162ShouldNotCallThis();163return NULL;164}165166inline intptr_t* frame::unextended_sp() const {167return (intptr_t *) -1;168}169170#endif // CPU_ZERO_FRAME_ZERO_INLINE_HPP171172173