src/share/vm/compiler/disassembler.cpp

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

*** 358,367 **** --- 358,383 ---- if (WizardMode) st->print(" " INTPTR_FORMAT, p2i(adr)); return; } } + if (_nm == NULL) { + // Don't do this for native methods, as the function name will be printed in + // nmethod::reloc_string_for(). + ResourceMark rm; + const int buflen = 1024; + char* buf = NEW_RESOURCE_ARRAY(char, buflen); + int offset; + if (os::dll_address_to_function_name(adr, buf, buflen, &offset)) { + st->print(PTR_FORMAT " = %s", p2i(adr), buf); + if (offset != 0) { + st->print("+%d", offset); + } + return; + } + } + // Fall through to a simple (hexadecimal) numeral. st->print(PTR_FORMAT, p2i(adr)); } void decode_env::print_insn_labels() {