Path: blob/master/src/hotspot/cpu/x86/frame_x86.cpp
64441 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#include "precompiled.hpp"25#include "compiler/oopMap.hpp"26#include "interpreter/interpreter.hpp"27#include "memory/resourceArea.hpp"28#include "memory/universe.hpp"29#include "oops/markWord.hpp"30#include "oops/method.hpp"31#include "oops/oop.inline.hpp"32#include "prims/methodHandles.hpp"33#include "runtime/frame.inline.hpp"34#include "runtime/handles.inline.hpp"35#include "runtime/javaCalls.hpp"36#include "runtime/monitorChunk.hpp"37#include "runtime/signature.hpp"38#include "runtime/stackWatermarkSet.hpp"39#include "runtime/stubCodeGenerator.hpp"40#include "runtime/stubRoutines.hpp"41#include "vmreg_x86.inline.hpp"42#include "utilities/formatBuffer.hpp"43#ifdef COMPILER144#include "c1/c1_Runtime1.hpp"45#include "runtime/vframeArray.hpp"46#endif4748#ifdef ASSERT49void RegisterMap::check_location_valid() {50}51#endif5253// Profiling/safepoint support5455bool frame::safe_for_sender(JavaThread *thread) {56address sp = (address)_sp;57address fp = (address)_fp;58address unextended_sp = (address)_unextended_sp;5960// consider stack guards when trying to determine "safe" stack pointers61// sp must be within the usable part of the stack (not in guards)62if (!thread->is_in_usable_stack(sp)) {63return false;64}6566// unextended sp must be within the stack and above or equal sp67if (!thread->is_in_stack_range_incl(unextended_sp, sp)) {68return false;69}7071// an fp must be within the stack and above (but not equal) sp72// second evaluation on fp+ is added to handle situation where fp is -173bool fp_safe = thread->is_in_stack_range_excl(fp, sp) &&74thread->is_in_full_stack_checked(fp + (return_addr_offset * sizeof(void*)));7576// We know sp/unextended_sp are safe only fp is questionable here7778// If the current frame is known to the code cache then we can attempt to79// construct the sender and do some validation of it. This goes a long way80// toward eliminating issues when we get in frame construction code8182if (_cb != NULL ) {8384// First check if frame is complete and tester is reliable85// Unfortunately we can only check frame complete for runtime stubs and nmethod86// other generic buffer blobs are more problematic so we just assume they are87// ok. adapter blobs never have a frame complete and are never ok.8889if (!_cb->is_frame_complete_at(_pc)) {90if (_cb->is_compiled() || _cb->is_adapter_blob() || _cb->is_runtime_stub()) {91return false;92}93}9495// Could just be some random pointer within the codeBlob96if (!_cb->code_contains(_pc)) {97return false;98}99100// Entry frame checks101if (is_entry_frame()) {102// an entry frame must have a valid fp.103return fp_safe && is_entry_frame_valid(thread);104} else if (is_optimized_entry_frame()) {105return fp_safe;106}107108intptr_t* sender_sp = NULL;109intptr_t* sender_unextended_sp = NULL;110address sender_pc = NULL;111intptr_t* saved_fp = NULL;112113if (is_interpreted_frame()) {114// fp must be safe115if (!fp_safe) {116return false;117}118119sender_pc = (address) this->fp()[return_addr_offset];120// for interpreted frames, the value below is the sender "raw" sp,121// which can be different from the sender unextended sp (the sp seen122// by the sender) because of current frame local variables123sender_sp = (intptr_t*) addr_at(sender_sp_offset);124sender_unextended_sp = (intptr_t*) this->fp()[interpreter_frame_sender_sp_offset];125saved_fp = (intptr_t*) this->fp()[link_offset];126127} else {128// must be some sort of compiled/runtime frame129// fp does not have to be safe (although it could be check for c1?)130131// check for a valid frame_size, otherwise we are unlikely to get a valid sender_pc132if (_cb->frame_size() <= 0) {133return false;134}135136sender_sp = _unextended_sp + _cb->frame_size();137// Is sender_sp safe?138if (!thread->is_in_full_stack_checked((address)sender_sp)) {139return false;140}141sender_unextended_sp = sender_sp;142// On Intel the return_address is always the word on the stack143sender_pc = (address) *(sender_sp-1);144// Note: frame::sender_sp_offset is only valid for compiled frame145saved_fp = (intptr_t*) *(sender_sp - frame::sender_sp_offset);146}147148149// If the potential sender is the interpreter then we can do some more checking150if (Interpreter::contains(sender_pc)) {151152// ebp is always saved in a recognizable place in any code we generate. However153// only if the sender is interpreted/call_stub (c1 too?) are we certain that the saved ebp154// is really a frame pointer.155156if (!thread->is_in_stack_range_excl((address)saved_fp, (address)sender_sp)) {157return false;158}159160// construct the potential sender161162frame sender(sender_sp, sender_unextended_sp, saved_fp, sender_pc);163164return sender.is_interpreted_frame_valid(thread);165166}167168// We must always be able to find a recognizable pc169CodeBlob* sender_blob = CodeCache::find_blob_unsafe(sender_pc);170if (sender_pc == NULL || sender_blob == NULL) {171return false;172}173174// Could be a zombie method175if (sender_blob->is_zombie() || sender_blob->is_unloaded()) {176return false;177}178179// Could just be some random pointer within the codeBlob180if (!sender_blob->code_contains(sender_pc)) {181return false;182}183184// We should never be able to see an adapter if the current frame is something from code cache185if (sender_blob->is_adapter_blob()) {186return false;187}188189// Could be the call_stub190if (StubRoutines::returns_to_call_stub(sender_pc)) {191if (!thread->is_in_stack_range_excl((address)saved_fp, (address)sender_sp)) {192return false;193}194195// construct the potential sender196197frame sender(sender_sp, sender_unextended_sp, saved_fp, sender_pc);198199// Validate the JavaCallWrapper an entry frame must have200address jcw = (address)sender.entry_frame_call_wrapper();201202return thread->is_in_stack_range_excl(jcw, (address)sender.fp());203} else if (sender_blob->is_optimized_entry_blob()) {204return false;205}206207CompiledMethod* nm = sender_blob->as_compiled_method_or_null();208if (nm != NULL) {209if (nm->is_deopt_mh_entry(sender_pc) || nm->is_deopt_entry(sender_pc) ||210nm->method()->is_method_handle_intrinsic()) {211return false;212}213}214215// If the frame size is 0 something (or less) is bad because every nmethod has a non-zero frame size216// because the return address counts against the callee's frame.217218if (sender_blob->frame_size() <= 0) {219assert(!sender_blob->is_compiled(), "should count return address at least");220return false;221}222223// We should never be able to see anything here except an nmethod. If something in the224// code cache (current frame) is called by an entity within the code cache that entity225// should not be anything but the call stub (already covered), the interpreter (already covered)226// or an nmethod.227228if (!sender_blob->is_compiled()) {229return false;230}231232// Could put some more validation for the potential non-interpreted sender233// frame we'd create by calling sender if I could think of any. Wait for next crash in forte...234235// One idea is seeing if the sender_pc we have is one that we'd expect to call to current cb236237// We've validated the potential sender that would be created238return true;239}240241// Must be native-compiled frame. Since sender will try and use fp to find242// linkages it must be safe243244if (!fp_safe) {245return false;246}247248// Will the pc we fetch be non-zero (which we'll find at the oldest frame)249250if ( (address) this->fp()[return_addr_offset] == NULL) return false;251252253// could try and do some more potential verification of native frame if we could think of some...254255return true;256257}258259260void frame::patch_pc(Thread* thread, address pc) {261assert(_cb == CodeCache::find_blob(pc), "unexpected pc");262address* pc_addr = &(((address*) sp())[-1]);263if (TracePcPatching) {264tty->print_cr("patch_pc at address " INTPTR_FORMAT " [" INTPTR_FORMAT " -> " INTPTR_FORMAT "]",265p2i(pc_addr), p2i(*pc_addr), p2i(pc));266}267// Either the return address is the original one or we are going to268// patch in the same address that's already there.269assert(_pc == *pc_addr || pc == *pc_addr, "must be");270*pc_addr = pc;271address original_pc = CompiledMethod::get_deopt_original_pc(this);272if (original_pc != NULL) {273assert(original_pc == _pc, "expected original PC to be stored before patching");274_deopt_state = is_deoptimized;275// leave _pc as is276} else {277_deopt_state = not_deoptimized;278_pc = pc;279}280}281282bool frame::is_interpreted_frame() const {283return Interpreter::contains(pc());284}285286int frame::frame_size(RegisterMap* map) const {287frame sender = this->sender(map);288return sender.sp() - sp();289}290291intptr_t* frame::entry_frame_argument_at(int offset) const {292// convert offset to index to deal with tsi293int index = (Interpreter::expr_offset_in_bytes(offset)/wordSize);294// Entry frame's arguments are always in relation to unextended_sp()295return &unextended_sp()[index];296}297298// sender_sp299300intptr_t* frame::interpreter_frame_sender_sp() const {301assert(is_interpreted_frame(), "interpreted frame expected");302return (intptr_t*) at(interpreter_frame_sender_sp_offset);303}304305void frame::set_interpreter_frame_sender_sp(intptr_t* sender_sp) {306assert(is_interpreted_frame(), "interpreted frame expected");307ptr_at_put(interpreter_frame_sender_sp_offset, (intptr_t) sender_sp);308}309310311// monitor elements312313BasicObjectLock* frame::interpreter_frame_monitor_begin() const {314return (BasicObjectLock*) addr_at(interpreter_frame_monitor_block_bottom_offset);315}316317BasicObjectLock* frame::interpreter_frame_monitor_end() const {318BasicObjectLock* result = (BasicObjectLock*) *addr_at(interpreter_frame_monitor_block_top_offset);319// make sure the pointer points inside the frame320assert(sp() <= (intptr_t*) result, "monitor end should be above the stack pointer");321assert((intptr_t*) result < fp(), "monitor end should be strictly below the frame pointer");322return result;323}324325void frame::interpreter_frame_set_monitor_end(BasicObjectLock* value) {326*((BasicObjectLock**)addr_at(interpreter_frame_monitor_block_top_offset)) = value;327}328329// Used by template based interpreter deoptimization330void frame::interpreter_frame_set_last_sp(intptr_t* sp) {331*((intptr_t**)addr_at(interpreter_frame_last_sp_offset)) = sp;332}333334frame frame::sender_for_entry_frame(RegisterMap* map) const {335assert(map != NULL, "map must be set");336// Java frame called from C; skip all C frames and return top C337// frame of that chunk as the sender338JavaFrameAnchor* jfa = entry_frame_call_wrapper()->anchor();339assert(!entry_frame_is_first(), "next Java fp must be non zero");340assert(jfa->last_Java_sp() > sp(), "must be above this frame on stack");341// Since we are walking the stack now this nested anchor is obviously walkable342// even if it wasn't when it was stacked.343jfa->make_walkable();344map->clear();345assert(map->include_argument_oops(), "should be set by clear");346frame fr(jfa->last_Java_sp(), jfa->last_Java_fp(), jfa->last_Java_pc());347348return fr;349}350351OptimizedEntryBlob::FrameData* OptimizedEntryBlob::frame_data_for_frame(const frame& frame) const {352assert(frame.is_optimized_entry_frame(), "wrong frame");353// need unextended_sp here, since normal sp is wrong for interpreter callees354return reinterpret_cast<OptimizedEntryBlob::FrameData*>(355reinterpret_cast<char*>(frame.unextended_sp()) + in_bytes(_frame_data_offset));356}357358bool frame::optimized_entry_frame_is_first() const {359assert(is_optimized_entry_frame(), "must be optimzed entry frame");360OptimizedEntryBlob* blob = _cb->as_optimized_entry_blob();361JavaFrameAnchor* jfa = blob->jfa_for_frame(*this);362return jfa->last_Java_sp() == NULL;363}364365frame frame::sender_for_optimized_entry_frame(RegisterMap* map) const {366assert(map != NULL, "map must be set");367OptimizedEntryBlob* blob = _cb->as_optimized_entry_blob();368// Java frame called from C; skip all C frames and return top C369// frame of that chunk as the sender370JavaFrameAnchor* jfa = blob->jfa_for_frame(*this);371assert(!optimized_entry_frame_is_first(), "must have a frame anchor to go back to");372assert(jfa->last_Java_sp() > sp(), "must be above this frame on stack");373// Since we are walking the stack now this nested anchor is obviously walkable374// even if it wasn't when it was stacked.375jfa->make_walkable();376map->clear();377assert(map->include_argument_oops(), "should be set by clear");378frame fr(jfa->last_Java_sp(), jfa->last_Java_fp(), jfa->last_Java_pc());379380return fr;381}382383//------------------------------------------------------------------------------384// frame::verify_deopt_original_pc385//386// Verifies the calculated original PC of a deoptimization PC for the387// given unextended SP.388#ifdef ASSERT389void frame::verify_deopt_original_pc(CompiledMethod* nm, intptr_t* unextended_sp) {390frame fr;391392// This is ugly but it's better than to change {get,set}_original_pc393// to take an SP value as argument. And it's only a debugging394// method anyway.395fr._unextended_sp = unextended_sp;396397address original_pc = nm->get_original_pc(&fr);398assert(nm->insts_contains_inclusive(original_pc),399"original PC must be in the main code section of the the compiled method (or must be immediately following it)");400}401#endif402403//------------------------------------------------------------------------------404// frame::adjust_unextended_sp405#ifdef ASSERT406void frame::adjust_unextended_sp() {407// On x86, sites calling method handle intrinsics and lambda forms are treated408// as any other call site. Therefore, no special action is needed when we are409// returning to any of these call sites.410411if (_cb != NULL) {412CompiledMethod* sender_cm = _cb->as_compiled_method_or_null();413if (sender_cm != NULL) {414// If the sender PC is a deoptimization point, get the original PC.415if (sender_cm->is_deopt_entry(_pc) ||416sender_cm->is_deopt_mh_entry(_pc)) {417verify_deopt_original_pc(sender_cm, _unextended_sp);418}419}420}421}422#endif423424//------------------------------------------------------------------------------425// frame::update_map_with_saved_link426void frame::update_map_with_saved_link(RegisterMap* map, intptr_t** link_addr) {427// The interpreter and compiler(s) always save EBP/RBP in a known428// location on entry. We must record where that location is429// so this if EBP/RBP was live on callout from c2 we can find430// the saved copy no matter what it called.431432// Since the interpreter always saves EBP/RBP if we record where it is then433// we don't have to always save EBP/RBP on entry and exit to c2 compiled434// code, on entry will be enough.435map->set_location(rbp->as_VMReg(), (address) link_addr);436#ifdef AMD64437// this is weird "H" ought to be at a higher address however the438// oopMaps seems to have the "H" regs at the same address and the439// vanilla register.440// XXXX make this go away441if (true) {442map->set_location(rbp->as_VMReg()->next(), (address) link_addr);443}444#endif // AMD64445}446447448//------------------------------------------------------------------------------449// frame::sender_for_interpreter_frame450frame frame::sender_for_interpreter_frame(RegisterMap* map) const {451// SP is the raw SP from the sender after adapter or interpreter452// extension.453intptr_t* sender_sp = this->sender_sp();454455// This is the sp before any possible extension (adapter/locals).456intptr_t* unextended_sp = interpreter_frame_sender_sp();457458#if COMPILER2_OR_JVMCI459if (map->update_map()) {460update_map_with_saved_link(map, (intptr_t**) addr_at(link_offset));461}462#endif // COMPILER2_OR_JVMCI463464return frame(sender_sp, unextended_sp, link(), sender_pc());465}466467468//------------------------------------------------------------------------------469// frame::sender_for_compiled_frame470frame frame::sender_for_compiled_frame(RegisterMap* map) const {471assert(map != NULL, "map must be set");472473// frame owned by optimizing compiler474assert(_cb->frame_size() >= 0, "must have non-zero frame size");475intptr_t* sender_sp = unextended_sp() + _cb->frame_size();476intptr_t* unextended_sp = sender_sp;477478// On Intel the return_address is always the word on the stack479address sender_pc = (address) *(sender_sp-1);480481// This is the saved value of EBP which may or may not really be an FP.482// It is only an FP if the sender is an interpreter frame (or C1?).483intptr_t** saved_fp_addr = (intptr_t**) (sender_sp - frame::sender_sp_offset);484485if (map->update_map()) {486// Tell GC to use argument oopmaps for some runtime stubs that need it.487// For C1, the runtime stub might not have oop maps, so set this flag488// outside of update_register_map.489map->set_include_argument_oops(_cb->caller_must_gc_arguments(map->thread()));490if (_cb->oop_maps() != NULL) {491OopMapSet::update_register_map(this, map);492}493494// Since the prolog does the save and restore of EBP there is no oopmap495// for it so we must fill in its location as if there was an oopmap entry496// since if our caller was compiled code there could be live jvm state in it.497update_map_with_saved_link(map, saved_fp_addr);498}499500assert(sender_sp != sp(), "must have changed");501return frame(sender_sp, unextended_sp, *saved_fp_addr, sender_pc);502}503504505//------------------------------------------------------------------------------506// frame::sender_raw507frame frame::sender_raw(RegisterMap* map) const {508// Default is we done have to follow them. The sender_for_xxx will509// update it accordingly510map->set_include_argument_oops(false);511512if (is_entry_frame()) return sender_for_entry_frame(map);513if (is_optimized_entry_frame()) return sender_for_optimized_entry_frame(map);514if (is_interpreted_frame()) return sender_for_interpreter_frame(map);515assert(_cb == CodeCache::find_blob(pc()),"Must be the same");516517if (_cb != NULL) {518return sender_for_compiled_frame(map);519}520// Must be native-compiled frame, i.e. the marshaling code for native521// methods that exists in the core system.522return frame(sender_sp(), link(), sender_pc());523}524525frame frame::sender(RegisterMap* map) const {526frame result = sender_raw(map);527528if (map->process_frames()) {529StackWatermarkSet::on_iteration(map->thread(), result);530}531532return result;533}534535bool frame::is_interpreted_frame_valid(JavaThread* thread) const {536assert(is_interpreted_frame(), "Not an interpreted frame");537// These are reasonable sanity checks538if (fp() == 0 || (intptr_t(fp()) & (wordSize-1)) != 0) {539return false;540}541if (sp() == 0 || (intptr_t(sp()) & (wordSize-1)) != 0) {542return false;543}544if (fp() + interpreter_frame_initial_sp_offset < sp()) {545return false;546}547// These are hacks to keep us out of trouble.548// The problem with these is that they mask other problems549if (fp() <= sp()) { // this attempts to deal with unsigned comparison above550return false;551}552553// do some validation of frame elements554// first the method555556Method* m = *interpreter_frame_method_addr();557558// validate the method we'd find in this potential sender559if (!Method::is_valid_method(m)) return false;560561// stack frames shouldn't be much larger than max_stack elements562// this test requires the use the unextended_sp which is the sp as seen by563// the current frame, and not sp which is the "raw" pc which could point564// further because of local variables of the callee method inserted after565// method arguments566if (fp() - unextended_sp() > 1024 + m->max_stack()*Interpreter::stackElementSize) {567return false;568}569570// validate bci/bcp571572address bcp = interpreter_frame_bcp();573if (m->validate_bci_from_bcp(bcp) < 0) {574return false;575}576577// validate ConstantPoolCache*578ConstantPoolCache* cp = *interpreter_frame_cache_addr();579if (MetaspaceObj::is_valid(cp) == false) return false;580581// validate locals582583address locals = (address) *interpreter_frame_locals_addr();584return thread->is_in_stack_range_incl(locals, (address)fp());585}586587BasicType frame::interpreter_frame_result(oop* oop_result, jvalue* value_result) {588assert(is_interpreted_frame(), "interpreted frame expected");589Method* method = interpreter_frame_method();590BasicType type = method->result_type();591592intptr_t* tos_addr;593if (method->is_native()) {594// Prior to calling into the runtime to report the method_exit the possible595// return value is pushed to the native stack. If the result is a jfloat/jdouble596// then ST0 is saved before EAX/EDX. See the note in generate_native_result597tos_addr = (intptr_t*)sp();598if (type == T_FLOAT || type == T_DOUBLE) {599// QQQ seems like this code is equivalent on the two platforms600#ifdef AMD64601// This is times two because we do a push(ltos) after pushing XMM0602// and that takes two interpreter stack slots.603tos_addr += 2 * Interpreter::stackElementWords;604#else605tos_addr += 2;606#endif // AMD64607}608} else {609tos_addr = (intptr_t*)interpreter_frame_tos_address();610}611612switch (type) {613case T_OBJECT :614case T_ARRAY : {615oop obj;616if (method->is_native()) {617obj = cast_to_oop(at(interpreter_frame_oop_temp_offset));618} else {619oop* obj_p = (oop*)tos_addr;620obj = (obj_p == NULL) ? (oop)NULL : *obj_p;621}622assert(Universe::is_in_heap_or_null(obj), "sanity check");623*oop_result = obj;624break;625}626case T_BOOLEAN : value_result->z = *(jboolean*)tos_addr; break;627case T_BYTE : value_result->b = *(jbyte*)tos_addr; break;628case T_CHAR : value_result->c = *(jchar*)tos_addr; break;629case T_SHORT : value_result->s = *(jshort*)tos_addr; break;630case T_INT : value_result->i = *(jint*)tos_addr; break;631case T_LONG : value_result->j = *(jlong*)tos_addr; break;632case T_FLOAT : {633#ifdef AMD64634value_result->f = *(jfloat*)tos_addr;635#else636if (method->is_native()) {637jdouble d = *(jdouble*)tos_addr; // Result was in ST0 so need to convert to jfloat638value_result->f = (jfloat)d;639} else {640value_result->f = *(jfloat*)tos_addr;641}642#endif // AMD64643break;644}645case T_DOUBLE : value_result->d = *(jdouble*)tos_addr; break;646case T_VOID : /* Nothing to do */ break;647default : ShouldNotReachHere();648}649650return type;651}652653654intptr_t* frame::interpreter_frame_tos_at(jint offset) const {655int index = (Interpreter::expr_offset_in_bytes(offset)/wordSize);656return &interpreter_frame_tos_address()[index];657}658659#ifndef PRODUCT660661#define DESCRIBE_FP_OFFSET(name) \662values.describe(frame_no, fp() + frame::name##_offset, #name)663664void frame::describe_pd(FrameValues& values, int frame_no) {665if (is_interpreted_frame()) {666DESCRIBE_FP_OFFSET(interpreter_frame_sender_sp);667DESCRIBE_FP_OFFSET(interpreter_frame_last_sp);668DESCRIBE_FP_OFFSET(interpreter_frame_method);669DESCRIBE_FP_OFFSET(interpreter_frame_mirror);670DESCRIBE_FP_OFFSET(interpreter_frame_mdp);671DESCRIBE_FP_OFFSET(interpreter_frame_cache);672DESCRIBE_FP_OFFSET(interpreter_frame_locals);673DESCRIBE_FP_OFFSET(interpreter_frame_bcp);674DESCRIBE_FP_OFFSET(interpreter_frame_initial_sp);675#ifdef AMD64676} else if (is_entry_frame()) {677// This could be more descriptive if we use the enum in678// stubGenerator to map to real names but it's most important to679// claim these frame slots so the error checking works.680for (int i = 0; i < entry_frame_after_call_words; i++) {681values.describe(frame_no, fp() - i, err_msg("call_stub word fp - %d", i));682}683#endif // AMD64684}685}686#endif // !PRODUCT687688intptr_t *frame::initial_deoptimization_info() {689// used to reset the saved FP690return fp();691}692693intptr_t* frame::real_fp() const {694if (_cb != NULL) {695// use the frame size if valid696int size = _cb->frame_size();697if (size > 0) {698return unextended_sp() + size;699}700}701// else rely on fp()702assert(! is_compiled_frame(), "unknown compiled frame size");703return fp();704}705706#ifndef PRODUCT707// This is a generic constructor which is only used by pns() in debug.cpp.708frame::frame(void* sp, void* fp, void* pc) {709init((intptr_t*)sp, (intptr_t*)fp, (address)pc);710}711712void frame::pd_ps() {}713#endif714715void JavaFrameAnchor::make_walkable() {716// last frame set?717if (last_Java_sp() == NULL) return;718// already walkable?719if (walkable()) return;720vmassert(last_Java_pc() == NULL, "already walkable");721_last_Java_pc = (address)_last_Java_sp[-1];722vmassert(walkable(), "something went wrong");723}724725726