frame.hpp revision 1601
ead1f93ee620d7580f7e53350fe5a884fc4f158aLiane Praza * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
ead1f93ee620d7580f7e53350fe5a884fc4f158aLiane Praza * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
ead1f93ee620d7580f7e53350fe5a884fc4f158aLiane Praza * This code is free software; you can redistribute it and/or modify it
ead1f93ee620d7580f7e53350fe5a884fc4f158aLiane Praza * under the terms of the GNU General Public License version 2 only, as
ead1f93ee620d7580f7e53350fe5a884fc4f158aLiane Praza * published by the Free Software Foundation.
ead1f93ee620d7580f7e53350fe5a884fc4f158aLiane Praza * This code is distributed in the hope that it will be useful, but WITHOUT
ead1f93ee620d7580f7e53350fe5a884fc4f158aLiane Praza * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
ead1f93ee620d7580f7e53350fe5a884fc4f158aLiane Praza * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
ead1f93ee620d7580f7e53350fe5a884fc4f158aLiane Praza * version 2 for more details (a copy is included in the LICENSE file that
ead1f93ee620d7580f7e53350fe5a884fc4f158aLiane Praza * accompanied this code).
ead1f93ee620d7580f7e53350fe5a884fc4f158aLiane Praza * You should have received a copy of the GNU General Public License version
ead1f93ee620d7580f7e53350fe5a884fc4f158aLiane Praza * 2 along with this work; if not, write to the Free Software Foundation,
ead1f93ee620d7580f7e53350fe5a884fc4f158aLiane Praza * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
ead1f93ee620d7580f7e53350fe5a884fc4f158aLiane Praza * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
ead1f93ee620d7580f7e53350fe5a884fc4f158aLiane Praza * or visit www.oracle.com if you need additional information or have any
ead1f93ee620d7580f7e53350fe5a884fc4f158aLiane Praza * questions.
ead1f93ee620d7580f7e53350fe5a884fc4f158aLiane Prazatypedef class BytecodeInterpreter* interpreterState;
ebbab6bbae913efeadfa3c6a1b082664a125f95bDan Price// A frame represents a physical stack frame (an activation). Frames
ead1f93ee620d7580f7e53350fe5a884fc4f158aLiane Praza// can be C or Java frames, and the Java frames can be interpreted or
ead1f93ee620d7580f7e53350fe5a884fc4f158aLiane Praza// compiled. In contrast, vframes represent source-level activations,
ead1f93ee620d7580f7e53350fe5a884fc4f158aLiane Praza// so that one physical frame can correspond to multiple source level
ebbab6bbae913efeadfa3c6a1b082664a125f95bDan Price// frames because of inlining.
ead1f93ee620d7580f7e53350fe5a884fc4f158aLiane Praza // Instance variables:
ead1f93ee620d7580f7e53350fe5a884fc4f158aLiane Praza intptr_t* _sp; // stack pointer (from Thread::last_Java_sp)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe address _pc; // program counter (the next instruction after the call)
frame();
bool is_interpreted_frame() const;
bool is_java_frame() const;
bool is_native_frame() const;
bool is_runtime_frame() const;
bool is_compiled_frame() const;
bool is_safepoint_blob_frame() const;
bool is_deoptimized_frame() const;
bool is_interpreted_frame_valid(JavaThread* thread) const; // performs sanity checks on interpreted frames.
bool should_be_deoptimized() const;
bool can_be_deoptimized() const;
oop* adjusted_obj_at_addr(methodOop method, int index) { return obj_at_addr(adjust_offset(method, index)); }
oop interpreter_callee_receiver(symbolHandle signature) { return *interpreter_callee_receiver_addr(signature); }
#ifndef CC_INTERP
// interpreter_frame_monitor_size reports the allocation size of a monitor in the interpreter stack.
static int interpreter_frame_monitor_size();
// corresponds to the old compiled/deoptimized fp
#ifdef PPC
bool entry_frame_is_first() const;
static int local_offset_for_compiler(int local_index, int nof_args, int max_nof_locals, int max_nof_monitors);
static int monitor_offset_for_compiler(int local_index, int nof_args, int max_nof_locals, int max_nof_monitors);
const char* print_name() const;
void oops_compiled_arguments_do(symbolHandle signature, bool has_receiver, const RegisterMap* reg_map, OopClosure* f);
void oops_do_internal(OopClosure* f, CodeBlobClosure* cf, RegisterMap* map, bool use_interpreter_oop_map_cache);
void oops_do(OopClosure* f, CodeBlobClosure* cf, RegisterMap* map) { oops_do_internal(f, cf, map, true); }
void gc_prologue();
void gc_epilogue();
void pd_gc_epilog();
# ifdef ENABLE_ZAP_DEAD_LOCALS
int pd_oop_map_offset_adjustment() const;
# include "incls/_frame_pd.hpp.incl"
bool _is_done;