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,10 +39,11 @@
 #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,10 +3049,22 @@
           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 {
+            static char buf[O_BUFLEN];
+            int offset;
+            bool found;
+            found = os::dll_address_to_function_name(dest, buf, sizeof(buf), &offset);
+
+            if (found) {
+              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";