src/share/vm/compiler/disassembler.cpp

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

@@ -359,11 +359,23 @@
       return;
     }
   }
 
   // Fall through to a simple (hexadecimal) numeral.
-  st->print(PTR_FORMAT, p2i(adr));
+  static char buf[O_BUFLEN];
+  int offset;
+  bool found;
+  found = os::dll_address_to_function_name(adr, buf, sizeof(buf), &offset);
+
+  if (found) {
+    st->print("  " PTR_FORMAT " = %s",  p2i(adr), buf);
+    if (offset != 0) {
+      st->print("+%d", offset);
+    }
+  } else {
+    st->print("  " PTR_FORMAT, p2i(adr));
+  }
 }
 
 void decode_env::print_insn_labels() {
   address p = cur_insn();
   outputStream* st = output();