--- old/src/share/vm/utilities/vmError.cpp 2015-09-16 15:19:21.000000000 -0700 +++ new/src/share/vm/utilities/vmError.cpp 2015-09-16 15:19:20.000000000 -0700 @@ -26,6 +26,7 @@ #include "precompiled.hpp" #include "code/codeCache.hpp" #include "compiler/compileBroker.hpp" +#include "compiler/disassembler.hpp" #include "gc/shared/collectedHeap.hpp" #include "prims/whitebox.hpp" #include "runtime/arguments.hpp" @@ -704,6 +705,31 @@ st->cr(); } + STEP(265, "(printing code blob if possible)") + + if (_verbose && _context) { + CodeBlob* cb = CodeCache::find_blob(_pc); + if (cb != NULL) { + if (Interpreter::contains(_pc)) { + // The interpreter CodeBlob is very large so try to print the codelet instead. + InterpreterCodelet* codelet = Interpreter::codelet_containing(_pc); + if (codelet != NULL) { + codelet->print_on(st); + Disassembler::decode(codelet->code_begin(), codelet->code_end(), st); + } + } else { + StubCodeDesc* desc = StubCodeDesc::desc_for(_pc); + if (desc != NULL) { + desc->print_on(st); + Disassembler::decode(desc->begin(), desc->end(), st); + } else { + Disassembler::decode(cb, st); + st->cr(); + } + } + } + } + STEP(270, "(printing VM operation)" ) if (_verbose && _thread && _thread->is_VM_thread()) {