comparison src/share/vm/runtime/frame.cpp @ 11173:6b0fd0964b87

Merge with http://hg.openjdk.java.net/hsx/hsx25/hotspot/
author Doug Simon <doug.simon@oracle.com>
date Wed, 31 Jul 2013 11:00:54 +0200
parents 836a62f43af9 e619a2766bcc
children cefad50507d8
comparison
equal deleted inserted replaced
10912:4ea54634f03e 11173:6b0fd0964b87
219 return s.is_first_frame(); 219 return s.is_first_frame();
220 } 220 }
221 221
222 222
223 bool frame::entry_frame_is_first() const { 223 bool frame::entry_frame_is_first() const {
224 return entry_frame_call_wrapper()->anchor()->last_Java_sp() == NULL; 224 return entry_frame_call_wrapper()->is_first_frame();
225 } 225 }
226 226
227 JavaCallWrapper* frame::entry_frame_call_wrapper_if_safe(JavaThread* thread) const {
228 JavaCallWrapper** jcw = entry_frame_call_wrapper_addr();
229 address addr = (address) jcw;
230
231 // addr must be within the usable part of the stack
232 if (thread->is_in_usable_stack(addr)) {
233 return *jcw;
234 }
235
236 return NULL;
237 }
227 238
228 bool frame::should_be_deoptimized() const { 239 bool frame::should_be_deoptimized() const {
229 if (_deopt_state == is_deoptimized || 240 if (_deopt_state == is_deoptimized ||
230 !is_compiled_frame() ) return false; 241 !is_compiled_frame() ) return false;
231 assert(_cb != NULL && _cb->is_nmethod(), "must be an nmethod"); 242 assert(_cb != NULL && _cb->is_nmethod(), "must be an nmethod");
385 } 396 }
386 397
387 Method* frame::interpreter_frame_method() const { 398 Method* frame::interpreter_frame_method() const {
388 assert(is_interpreted_frame(), "interpreted frame expected"); 399 assert(is_interpreted_frame(), "interpreted frame expected");
389 Method* m = *interpreter_frame_method_addr(); 400 Method* m = *interpreter_frame_method_addr();
390 assert(m->is_metadata(), "bad Method* in interpreter frame");
391 assert(m->is_method(), "not a Method*"); 401 assert(m->is_method(), "not a Method*");
392 return m; 402 return m;
393 } 403 }
394 404
395 void frame::interpreter_frame_set_method(Method* method) { 405 void frame::interpreter_frame_set_method(Method* method) {
711 st->print("v ~BufferBlob::%s", ((BufferBlob *)_cb)->name()); 721 st->print("v ~BufferBlob::%s", ((BufferBlob *)_cb)->name());
712 } else if (_cb->is_nmethod()) { 722 } else if (_cb->is_nmethod()) {
713 Method* m = ((nmethod *)_cb)->method(); 723 Method* m = ((nmethod *)_cb)->method();
714 if (m != NULL) { 724 if (m != NULL) {
715 m->name_and_sig_as_C_string(buf, buflen); 725 m->name_and_sig_as_C_string(buf, buflen);
716 st->print("J %s", buf); 726 st->print("J %s @ " PTR_FORMAT " [" PTR_FORMAT "+" SIZE_FORMAT "]",
727 buf, _pc, _cb->code_begin(), _pc - _cb->code_begin());
717 } else { 728 } else {
718 st->print("J " PTR_FORMAT, pc()); 729 st->print("J " PTR_FORMAT, pc());
719 } 730 }
720 } else if (_cb->is_runtime_stub()) { 731 } else if (_cb->is_runtime_stub()) {
721 st->print("v ~RuntimeStub::%s", ((RuntimeStub *)_cb)->name()); 732 st->print("v ~RuntimeStub::%s", ((RuntimeStub *)_cb)->name());