aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkvn <none@none>2010-02-12 08:54:13 -0800
committerkvn <none@none>2010-02-12 08:54:13 -0800
commita96e20ce1237e783789f99f7deea89c109d98b9c (patch)
treed533617715db053ee8801cd17ff0e3521ff3723f
parent3dd6d61e923c8b9bf59f4192d714aaa4d184dc50 (diff)
6925249: assert(last_sp < (intptr_t*) interpreter_frame_monitor_begin(),"bad tos")
Summary: Fix assert since top deoptimized frame has last_sp == interpreter_frame_monitor_begin if there are no expressions. Reviewed-by: twisti
-rw-r--r--src/cpu/x86/vm/frame_x86.inline.hpp3
-rw-r--r--src/share/vm/runtime/deoptimization.cpp15
-rw-r--r--src/share/vm/runtime/frame.cpp8
-rw-r--r--src/share/vm/runtime/vframeArray.cpp7
4 files changed, 9 insertions, 24 deletions
diff --git a/src/cpu/x86/vm/frame_x86.inline.hpp b/src/cpu/x86/vm/frame_x86.inline.hpp
index 809e26cfa..bf68ce927 100644
--- a/src/cpu/x86/vm/frame_x86.inline.hpp
+++ b/src/cpu/x86/vm/frame_x86.inline.hpp
@@ -233,7 +233,8 @@ inline intptr_t* frame::interpreter_frame_tos_address() const {
} else {
// sp() may have been extended or shrunk by an adapter. At least
// check that we don't fall behind the legal region.
- assert(last_sp < (intptr_t*) interpreter_frame_monitor_begin(), "bad tos");
+ // For top deoptimized frame last_sp == interpreter_frame_monitor_end.
+ assert(last_sp <= (intptr_t*) interpreter_frame_monitor_end(), "bad tos");
return last_sp;
}
}
diff --git a/src/share/vm/runtime/deoptimization.cpp b/src/share/vm/runtime/deoptimization.cpp
index db34edbee..d3d60d915 100644
--- a/src/share/vm/runtime/deoptimization.cpp
+++ b/src/share/vm/runtime/deoptimization.cpp
@@ -938,21 +938,6 @@ vframeArray* Deoptimization::create_vframeArray(JavaThread* thread, frame fr, Re
if (TraceDeoptimization) {
ttyLocker ttyl;
tty->print_cr(" Created vframeArray " INTPTR_FORMAT, array);
- if (Verbose) {
- int count = 0;
- // this used to leak deoptimizedVFrame like it was going out of style!!!
- for (int index = 0; index < array->frames(); index++ ) {
- vframeArrayElement* e = array->element(index);
- e->print(tty);
-
- /*
- No printing yet.
- array->vframe_at(index)->print_activation(count++);
- // better as...
- array->print_activation_for(index, count++);
- */
- }
- }
}
#endif // PRODUCT
diff --git a/src/share/vm/runtime/frame.cpp b/src/share/vm/runtime/frame.cpp
index 5844107c5..30782f355 100644
--- a/src/share/vm/runtime/frame.cpp
+++ b/src/share/vm/runtime/frame.cpp
@@ -606,12 +606,12 @@ void frame::interpreter_frame_print_on(outputStream* st) const {
for (BasicObjectLock* current = interpreter_frame_monitor_end();
current < interpreter_frame_monitor_begin();
current = next_monitor_in_interpreter_frame(current)) {
- st->print_cr(" [ - obj ");
+ st->print(" - obj [");
current->obj()->print_value_on(st);
- st->cr();
- st->print_cr(" - lock ");
+ st->print_cr("]");
+ st->print(" - lock [");
current->lock()->print_on(st);
- st->cr();
+ st->print_cr("]");
}
// monitor
st->print_cr(" - monitor[" INTPTR_FORMAT "]", interpreter_frame_monitor_begin());
diff --git a/src/share/vm/runtime/vframeArray.cpp b/src/share/vm/runtime/vframeArray.cpp
index 3f507d217..6a9aac2ef 100644
--- a/src/share/vm/runtime/vframeArray.cpp
+++ b/src/share/vm/runtime/vframeArray.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright 1997-2009 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2010 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -186,7 +186,7 @@ void vframeArrayElement::unpack_on_stack(int callee_parameters,
int popframe_preserved_args_size_in_bytes = 0;
int popframe_preserved_args_size_in_words = 0;
if (is_top_frame) {
- JvmtiThreadState *state = thread->jvmti_thread_state();
+ JvmtiThreadState *state = thread->jvmti_thread_state();
if (JvmtiExport::can_pop_frame() &&
(thread->has_pending_popframe() || thread->popframe_forcing_deopt_reexecution())) {
if (thread->has_pending_popframe()) {
@@ -381,7 +381,6 @@ void vframeArrayElement::unpack_on_stack(int callee_parameters,
RegisterMap map(thread);
vframe* f = vframe::new_vframe(iframe(), &map, thread);
f->print();
- iframe()->interpreter_frame_print_on(tty);
tty->print_cr("locals size %d", locals()->size());
tty->print_cr("expression size %d", expressions()->size());
@@ -582,7 +581,7 @@ void vframeArray::print_on_2(outputStream* st) {
}
void vframeArrayElement::print(outputStream* st) {
- st->print_cr(" - interpreter_frame -> sp: ", INTPTR_FORMAT, iframe()->sp());
+ st->print_cr(" - interpreter_frame -> sp: " INTPTR_FORMAT, iframe()->sp());
}
void vframeArray::print_value_on(outputStream* st) const {