frame.cpp revision 3087
553N/A * or visit www.oracle.com if you need additional information or have any
0N/A#include "precompiled.hpp"
0N/A#include "gc_interface/collectedHeap.inline.hpp"
0N/A#include "interpreter/interpreter.hpp"
0N/A#include "interpreter/oopMapCache.hpp"
0N/A#include "memory/resourceArea.hpp"
288N/A#include "memory/universe.inline.hpp"
0N/A#include "oops/markOop.hpp"
0N/A#include "oops/methodDataOop.hpp"
0N/A#include "oops/methodOop.hpp"
0N/A#include "oops/oop.inline.hpp"
0N/A#include "oops/oop.inline2.hpp"
0N/A#include "prims/methodHandles.hpp"
0N/A#include "runtime/frame.inline.hpp"
0N/A#include "runtime/handles.inline.hpp"
0N/A#include "runtime/javaCalls.hpp"
0N/A#include "runtime/monitorChunk.hpp"
#include "runtime/sharedRuntime.hpp"
#include "runtime/signature.hpp"
#include "runtime/stubCodeGenerator.hpp"
#include "runtime/stubRoutines.hpp"
#include "utilities/decoder.hpp"
#ifdef TARGET_ARCH_x86
# include "nativeInst_x86.hpp"
#ifdef TARGET_ARCH_sparc
# include "nativeInst_sparc.hpp"
#ifdef TARGET_ARCH_zero
# include "nativeInst_zero.hpp"
#ifdef TARGET_ARCH_arm
# include "nativeInst_arm.hpp"
#ifdef TARGET_ARCH_ppc
# include "nativeInst_ppc.hpp"
clear();
#ifndef PRODUCT
if (update_map()) {
for(int i = 0; i < location_valid_size; i++) {
int j = i*location_valid_type_size;
while (bits != 0) {
set_include_argument_oops(true);
if (_update_map) {
for(int i = 0; i < location_valid_size; i++) {
_location_valid[i] = 0;
pd_clear();
#ifndef PRODUCT
for(int i = 0; i < reg_count; i++) {
if (is_deoptimized_frame()) {
#ifdef ASSERT
if (is_interpreted_frame()) return true;
if (is_compiled_frame()) return true;
frame s;
return s.is_first_frame();
!is_compiled_frame() ) return false;
if (TraceDependencies) {
if (!is_compiled_frame()) return false;
// It is possible especially with DeoptimizeALot/DeoptimizeRandom that
#ifdef ASSERT
frame s;
return result;
if (is_java_frame()) {
first_java_frame = *this;
return first_java_frame;
if (ProfileInterpreter) {
if (mdx != 0) {
if (formerly_bci) {
if (!is_now_bci) {
if (is_now_bci) {
#ifdef ASSERT
BasicObjectLock* next = (BasicObjectLock*) (((intptr_t*) current) + interpreter_frame_monitor_size());
return next;
#ifdef ASSERT
BasicObjectLock* previous = (BasicObjectLock*) (((intptr_t*) current) - interpreter_frame_monitor_size());
return previous;
return &((*interpreter_frame_locals_addr())[n]);
return &(interpreter_frame_expression_stack()[n]);
return (interpreter_frame_expression_stack() -
return (interpreter_frame_tos_address() -
if (is_compiled_frame()) {
st->print("%s frame (sp=" INTPTR_FORMAT " unextended sp=" INTPTR_FORMAT, print_name(), sp(), unextended_sp());
#ifndef PRODUCT
if (is_interpreted_frame()) {
#ifndef PRODUCT
jint i;
int offset;
bool found;
if (found) {
// names if pc is within jvm.dll or libjvm.so, because JVM only has
if (found) {
if (m != NULL) {
if (m != NULL) {
int _max_locals;
int _max_stack;
OopClosure* f) {
_f = f;
// this condition. Therefore, we call f only if addr is 'inside' the stack (i.e., addr >= esp for Intel).
bool in_stack;
if (in_stack) {
void oop_offset_do() {
InterpretedArgumentOopFinder(Symbol* signature, bool has_receiver, frame* fr, OopClosure* f) : SignatureInfo(signature), _has_receiver(has_receiver) {
_f = f;
void oops_do() {
if (_has_receiver) {
--_offset;
bool _is_static;
int _offset;
_f = f;
assert((m->is_native() && bci == 0) || (!m->is_native() && bci >= 0 && bci < m->code_size()), "invalid bci value");
#ifdef ASSERT
#ifdef CC_INTERP
if (m->is_native()) {
#ifdef CC_INTERP
bool has_receiver = false;
if (!m->is_native()) {
// occurred during method resolution/execution. In all
if (query_oop_map_cache) {
int _arg_size;
virtual void handle_oop_offset() {
CompiledArgumentOopFinder(Symbol* signature, bool has_receiver, OopClosure* f, frame fr, const RegisterMap* reg_map)
_f = f;
_offset = 0;
int arg_size;
void oops_do() {
if (_has_receiver) {
_offset++;
void frame::oops_compiled_arguments_do(Symbol* signature, bool has_receiver, const RegisterMap* reg_map, OopClosure* f) {
// Note: caller.sp() points to callee-arguments
return owner;
void frame::oops_do_internal(OopClosure* f, CodeBlobClosure* cf, RegisterMap* map, bool use_interpreter_oop_map_cache) {
#ifndef PRODUCT
if (CrashGCForDumpingJavaThread) {
char *t = NULL;
if (is_interpreted_frame()) {
} else if (is_entry_frame()) {
#ifdef SHARK
} else if (is_fake_stub_frame()) {
if (is_interpreted_frame()) {
if (is_interpreted_frame()) {
pd_gc_epilog();
# ifdef ENABLE_ZAP_DEAD_LOCALS
warning("value @ " INTPTR_FORMAT " looks oopish (" INTPTR_FORMAT ") (thread = " INTPTR_FORMAT ")", p, (address)*p, Thread::current());
warning("value @ " INTPTR_FORMAT " should be an oop (" INTPTR_FORMAT ") (thread = " INTPTR_FORMAT ")", p, (address)*p, Thread::current());
if (TraceZapDeadLocals) tty->print_cr("zapping @ " INTPTR_FORMAT " containing " INTPTR_FORMAT, p, (address)*p);
if (TraceZapDeadLocals) {
if (TraceZapDeadLocals) {
&_check_value);
&_check_oop );
&_zap_dead );
if (is_interpreted_frame()) {
#ifdef ASSERT
#ifdef ASSERT
if (is_interpreted_frame()) {
if (m->max_locals() > 0) {
for (int l = 0; l < m->max_locals(); l++) {
} else if (is_entry_frame()) {
} else if (is_compiled_frame()) {
} else if (is_native_frame()) {
_is_done = false;
#ifdef ASSERT
bool error = false;
tty->print_cr(" " INTPTR_FORMAT ": " INTPTR_FORMAT " %s", prev.location, *prev.location, prev.description);
tty->print_cr(" " INTPTR_FORMAT ": " INTPTR_FORMAT " %s", fv.location, *fv.location, fv.description);
error = true;
int min_index = 0;
cur--;
tty->print_cr(" " INTPTR_FORMAT ": " INTPTR_FORMAT " %s", fv.location, *fv.location, fv.description);
cur--;