src/share/vm/runtime/frame.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File bug_8169551 Sdiff src/share/vm/runtime

src/share/vm/runtime/frame.cpp

Print this page




 647 //    j: Java frame (interpreted)
 648 //    V: VM frame (C/C++)
 649 //    v: Other frames running VM generated code (e.g. stubs, adapters, etc.)
 650 //    C: C/C++ frame
 651 //
 652 // We don't need detailed frame type as that in frame::print_name(). "C"
 653 // suggests the problem is in user lib; everything else is likely a VM bug.
 654 
 655 void frame::print_on_error(outputStream* st, char* buf, int buflen, bool verbose) const {
 656   if (_cb != NULL) {
 657     if (Interpreter::contains(pc())) {
 658       Method* m = this->interpreter_frame_method();
 659       if (m != NULL) {
 660         m->name_and_sig_as_C_string(buf, buflen);
 661         st->print("j  %s", buf);
 662         st->print("+%d", this->interpreter_frame_bci());
 663         ModuleEntry* module = m->method_holder()->module();
 664         if (module->is_named()) {
 665           module->name()->as_C_string(buf, buflen);
 666           st->print(" %s", buf);

 667           module->version()->as_C_string(buf, buflen);
 668           st->print("@%s", buf);
 669         }

 670       } else {
 671         st->print("j  " PTR_FORMAT, p2i(pc()));
 672       }
 673     } else if (StubRoutines::contains(pc())) {
 674       StubCodeDesc* desc = StubCodeDesc::desc_for(pc());
 675       if (desc != NULL) {
 676         st->print("v  ~StubRoutines::%s", desc->name());
 677       } else {
 678         st->print("v  ~StubRoutines::" PTR_FORMAT, p2i(pc()));
 679       }
 680     } else if (_cb->is_buffer_blob()) {
 681       st->print("v  ~BufferBlob::%s", ((BufferBlob *)_cb)->name());
 682     } else if (_cb->is_compiled()) {
 683       CompiledMethod* cm = (CompiledMethod*)_cb;
 684       Method* m = cm->method();
 685       if (m != NULL) {
 686         if (cm->is_nmethod()) {
 687           nmethod* nm = cm->as_nmethod();
 688           st->print("J %d%s", nm->compile_id(), (nm->is_osr_method() ? "%" : ""));
 689           st->print(" %s", nm->compiler_name());
 690         }
 691         m->name_and_sig_as_C_string(buf, buflen);
 692         st->print(" %s", buf);
 693         ModuleEntry* module = m->method_holder()->module();
 694         if (module->is_named()) {
 695           module->name()->as_C_string(buf, buflen);
 696           st->print(" %s", buf);

 697           module->version()->as_C_string(buf, buflen);
 698           st->print("@%s", buf);

 699         }
 700         st->print(" (%d bytes) @ " PTR_FORMAT " [" PTR_FORMAT "+" INTPTR_FORMAT "]",
 701                   m->code_size(), p2i(_pc), p2i(_cb->code_begin()), _pc - _cb->code_begin());
 702 #if INCLUDE_JVMCI
 703         if (cm->is_nmethod()) {
 704           nmethod* nm = cm->as_nmethod();
 705           char* jvmciName = nm->jvmci_installed_code_name(buf, buflen);
 706           if (jvmciName != NULL) {
 707             st->print(" (%s)", jvmciName);
 708           }
 709         }
 710 #endif
 711       } else {
 712         st->print("J  " PTR_FORMAT, p2i(pc()));
 713       }
 714     } else if (_cb->is_runtime_stub()) {
 715       st->print("v  ~RuntimeStub::%s", ((RuntimeStub *)_cb)->name());
 716     } else if (_cb->is_deoptimization_stub()) {
 717       st->print("v  ~DeoptimizationBlob");
 718     } else if (_cb->is_exception_stub()) {




 647 //    j: Java frame (interpreted)
 648 //    V: VM frame (C/C++)
 649 //    v: Other frames running VM generated code (e.g. stubs, adapters, etc.)
 650 //    C: C/C++ frame
 651 //
 652 // We don't need detailed frame type as that in frame::print_name(). "C"
 653 // suggests the problem is in user lib; everything else is likely a VM bug.
 654 
 655 void frame::print_on_error(outputStream* st, char* buf, int buflen, bool verbose) const {
 656   if (_cb != NULL) {
 657     if (Interpreter::contains(pc())) {
 658       Method* m = this->interpreter_frame_method();
 659       if (m != NULL) {
 660         m->name_and_sig_as_C_string(buf, buflen);
 661         st->print("j  %s", buf);
 662         st->print("+%d", this->interpreter_frame_bci());
 663         ModuleEntry* module = m->method_holder()->module();
 664         if (module->is_named()) {
 665           module->name()->as_C_string(buf, buflen);
 666           st->print(" %s", buf);
 667           if (module->version() != NULL) {
 668             module->version()->as_C_string(buf, buflen);
 669             st->print("@%s", buf);
 670           }
 671         }
 672       } else {
 673         st->print("j  " PTR_FORMAT, p2i(pc()));
 674       }
 675     } else if (StubRoutines::contains(pc())) {
 676       StubCodeDesc* desc = StubCodeDesc::desc_for(pc());
 677       if (desc != NULL) {
 678         st->print("v  ~StubRoutines::%s", desc->name());
 679       } else {
 680         st->print("v  ~StubRoutines::" PTR_FORMAT, p2i(pc()));
 681       }
 682     } else if (_cb->is_buffer_blob()) {
 683       st->print("v  ~BufferBlob::%s", ((BufferBlob *)_cb)->name());
 684     } else if (_cb->is_compiled()) {
 685       CompiledMethod* cm = (CompiledMethod*)_cb;
 686       Method* m = cm->method();
 687       if (m != NULL) {
 688         if (cm->is_nmethod()) {
 689           nmethod* nm = cm->as_nmethod();
 690           st->print("J %d%s", nm->compile_id(), (nm->is_osr_method() ? "%" : ""));
 691           st->print(" %s", nm->compiler_name());
 692         }
 693         m->name_and_sig_as_C_string(buf, buflen);
 694         st->print(" %s", buf);
 695         ModuleEntry* module = m->method_holder()->module();
 696         if (module->is_named()) {
 697           module->name()->as_C_string(buf, buflen);
 698           st->print(" %s", buf);
 699           if (module->version() != NULL) {
 700             module->version()->as_C_string(buf, buflen);
 701             st->print("@%s", buf);
 702           }
 703         }
 704         st->print(" (%d bytes) @ " PTR_FORMAT " [" PTR_FORMAT "+" INTPTR_FORMAT "]",
 705                   m->code_size(), p2i(_pc), p2i(_cb->code_begin()), _pc - _cb->code_begin());
 706 #if INCLUDE_JVMCI
 707         if (cm->is_nmethod()) {
 708           nmethod* nm = cm->as_nmethod();
 709           char* jvmciName = nm->jvmci_installed_code_name(buf, buflen);
 710           if (jvmciName != NULL) {
 711             st->print(" (%s)", jvmciName);
 712           }
 713         }
 714 #endif
 715       } else {
 716         st->print("J  " PTR_FORMAT, p2i(pc()));
 717       }
 718     } else if (_cb->is_runtime_stub()) {
 719       st->print("v  ~RuntimeStub::%s", ((RuntimeStub *)_cb)->name());
 720     } else if (_cb->is_deoptimization_stub()) {
 721       st->print("v  ~DeoptimizationBlob");
 722     } else if (_cb->is_exception_stub()) {


src/share/vm/runtime/frame.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File