src/share/vm/code/nmethod.cpp

Print this page
rev 9627 : 8144853: Print the names of callees in PrintAssembly/PrintInterpreter
Reviewed-by: xxx, yyy

*** 39,48 **** --- 39,49 ---- #include "oops/oop.inline.hpp" #include "prims/jvmtiRedefineClassesTrace.hpp" #include "prims/jvmtiImpl.hpp" #include "runtime/atomic.inline.hpp" #include "runtime/orderAccess.inline.hpp" + #include "runtime/os.hpp" #include "runtime/sharedRuntime.hpp" #include "runtime/sweeper.hpp" #include "utilities/resourceHash.hpp" #include "utilities/dtrace.hpp" #include "utilities/events.hpp"
*** 3048,3057 **** --- 3049,3069 ---- runtime_call_Relocation* r = iter.runtime_call_reloc(); address dest = r->destination(); CodeBlob* cb = CodeCache::find_blob(dest); if (cb != NULL) { st.print(" %s", cb->name()); + } else { + ResourceMark rm; + const int buflen = 1024; + char* buf = NEW_RESOURCE_ARRAY(char, buflen); + int offset; + if (os::dll_address_to_function_name(dest, buf, buflen, &offset)) { + st.print(" %s", buf); + if (offset != 0) { + st.print("+%d", offset); + } + } } return st.as_string(); } case relocInfo::virtual_call_type: return "virtual_call"; case relocInfo::opt_virtual_call_type: return "optimized virtual_call";