< prev index next >

src/share/vm/runtime/frame.cpp

Print this page




 644         m->name_and_sig_as_C_string(buf, buflen);
 645         st->print("j  %s", buf);
 646         st->print("+%d", this->interpreter_frame_bci());
 647       } else {
 648         st->print("j  " PTR_FORMAT, pc());
 649       }
 650     } else if (StubRoutines::contains(pc())) {
 651       StubCodeDesc* desc = StubCodeDesc::desc_for(pc());
 652       if (desc != NULL) {
 653         st->print("v  ~StubRoutines::%s", desc->name());
 654       } else {
 655         st->print("v  ~StubRoutines::" PTR_FORMAT, pc());
 656       }
 657     } else if (_cb->is_buffer_blob()) {
 658       st->print("v  ~BufferBlob::%s", ((BufferBlob *)_cb)->name());
 659     } else if (_cb->is_nmethod()) {
 660       nmethod* nm = (nmethod*)_cb;
 661       Method* m = nm->method();
 662       if (m != NULL) {
 663         m->name_and_sig_as_C_string(buf, buflen);
 664         st->print("J %d%s %s %s (%d bytes) @ " PTR_FORMAT " [" PTR_FORMAT "+0x%x]",
 665                   nm->compile_id(), (nm->is_osr_method() ? "%" : ""),
 666                   ((nm->compiler() != NULL) ? nm->compiler()->name() : ""),







 667                   buf, m->code_size(), _pc, _cb->code_begin(), _pc - _cb->code_begin());
 668       } else {
 669         st->print("J  " PTR_FORMAT, pc());
 670       }
 671     } else if (_cb->is_runtime_stub()) {
 672       st->print("v  ~RuntimeStub::%s", ((RuntimeStub *)_cb)->name());
 673     } else if (_cb->is_deoptimization_stub()) {
 674       st->print("v  ~DeoptimizationBlob");
 675     } else if (_cb->is_exception_stub()) {
 676       st->print("v  ~ExceptionBlob");
 677     } else if (_cb->is_safepoint_stub()) {
 678       st->print("v  ~SafepointBlob");
 679     } else {
 680       st->print("v  blob " PTR_FORMAT, pc());
 681     }
 682   } else {
 683     print_C_frame(st, buf, buflen, pc());
 684   }
 685 }
 686 


1105 // Have to walk the entire code cache for the compiled frames Yuck.
1106 void frame::metadata_do(void f(Metadata*)) {
1107   if (is_interpreted_frame()) {
1108     Method* m = this->interpreter_frame_method();
1109     assert(m != NULL, "expecting a method in this frame");
1110     f(m);
1111   }
1112 }
1113 
1114 void frame::verify(const RegisterMap* map) {
1115   // for now make sure receiver type is correct
1116   if (is_interpreted_frame()) {
1117     Method* method = interpreter_frame_method();
1118     guarantee(method->is_method(), "method is wrong in frame::verify");
1119     if (!method->is_static()) {
1120       // fetch the receiver
1121       oop* p = (oop*) interpreter_frame_local_at(0);
1122       // make sure we have the right receiver type
1123     }
1124   }
1125   COMPILER2_PRESENT(assert(DerivedPointerTable::is_empty(), "must be empty before verify");)


1126   oops_do_internal(&VerifyOopClosure::verify_oop, NULL, NULL, (RegisterMap*)map, false);
1127 }
1128 
1129 
1130 #ifdef ASSERT
1131 bool frame::verify_return_pc(address x) {
1132   if (StubRoutines::returns_to_call_stub(x)) {
1133     return true;
1134   }
1135   if (CodeCache::contains(x)) {
1136     return true;
1137   }
1138   if (Interpreter::contains(x)) {
1139     return true;
1140   }
1141   return false;
1142 }
1143 #endif
1144 
1145 #ifdef ASSERT




 644         m->name_and_sig_as_C_string(buf, buflen);
 645         st->print("j  %s", buf);
 646         st->print("+%d", this->interpreter_frame_bci());
 647       } else {
 648         st->print("j  " PTR_FORMAT, pc());
 649       }
 650     } else if (StubRoutines::contains(pc())) {
 651       StubCodeDesc* desc = StubCodeDesc::desc_for(pc());
 652       if (desc != NULL) {
 653         st->print("v  ~StubRoutines::%s", desc->name());
 654       } else {
 655         st->print("v  ~StubRoutines::" PTR_FORMAT, pc());
 656       }
 657     } else if (_cb->is_buffer_blob()) {
 658       st->print("v  ~BufferBlob::%s", ((BufferBlob *)_cb)->name());
 659     } else if (_cb->is_nmethod()) {
 660       nmethod* nm = (nmethod*)_cb;
 661       Method* m = nm->method();
 662       if (m != NULL) {
 663         m->name_and_sig_as_C_string(buf, buflen);
 664         st->print("J %d%s %s ",
 665                   nm->compile_id(), (nm->is_osr_method() ? "%" : ""),
 666                   ((nm->compiler() != NULL) ? nm->compiler()->name() : ""));
 667 #if INCLUDE_JVMCI
 668         char* jvmciName = nm->jvmci_installed_code_name(buf, buflen);
 669         if (jvmciName != NULL) {
 670           st->print(" (%s)", jvmciName);
 671         }
 672 #endif
 673         st->print("%s (%d bytes) @ " PTR_FORMAT " [" PTR_FORMAT "+0x%x]",
 674                   buf, m->code_size(), _pc, _cb->code_begin(), _pc - _cb->code_begin());
 675       } else {
 676         st->print("J  " PTR_FORMAT, pc());
 677       }
 678     } else if (_cb->is_runtime_stub()) {
 679       st->print("v  ~RuntimeStub::%s", ((RuntimeStub *)_cb)->name());
 680     } else if (_cb->is_deoptimization_stub()) {
 681       st->print("v  ~DeoptimizationBlob");
 682     } else if (_cb->is_exception_stub()) {
 683       st->print("v  ~ExceptionBlob");
 684     } else if (_cb->is_safepoint_stub()) {
 685       st->print("v  ~SafepointBlob");
 686     } else {
 687       st->print("v  blob " PTR_FORMAT, pc());
 688     }
 689   } else {
 690     print_C_frame(st, buf, buflen, pc());
 691   }
 692 }
 693 


1112 // Have to walk the entire code cache for the compiled frames Yuck.
1113 void frame::metadata_do(void f(Metadata*)) {
1114   if (is_interpreted_frame()) {
1115     Method* m = this->interpreter_frame_method();
1116     assert(m != NULL, "expecting a method in this frame");
1117     f(m);
1118   }
1119 }
1120 
1121 void frame::verify(const RegisterMap* map) {
1122   // for now make sure receiver type is correct
1123   if (is_interpreted_frame()) {
1124     Method* method = interpreter_frame_method();
1125     guarantee(method->is_method(), "method is wrong in frame::verify");
1126     if (!method->is_static()) {
1127       // fetch the receiver
1128       oop* p = (oop*) interpreter_frame_local_at(0);
1129       // make sure we have the right receiver type
1130     }
1131   }
1132 #if defined(COMPILER2) || INCLUDE_JVMCI
1133   assert(DerivedPointerTable::is_empty(), "must be empty before verify");
1134 #endif
1135   oops_do_internal(&VerifyOopClosure::verify_oop, NULL, NULL, (RegisterMap*)map, false);
1136 }
1137 
1138 
1139 #ifdef ASSERT
1140 bool frame::verify_return_pc(address x) {
1141   if (StubRoutines::returns_to_call_stub(x)) {
1142     return true;
1143   }
1144   if (CodeCache::contains(x)) {
1145     return true;
1146   }
1147   if (Interpreter::contains(x)) {
1148     return true;
1149   }
1150   return false;
1151 }
1152 #endif
1153 
1154 #ifdef ASSERT


< prev index next >