Currently, only frame.cpp has this hotspot/src/share/vm/runtime/frame.cpp
bool in_vm = os::address_is_in_vm(pc);
// function name - os::dll_address_to_function_name() may return confusing
// names if pc is within jvm.dll or libjvm.so, because JVM only has
// JVM_xxxx and a few other symbols in the dynamic symbol table. Do this
// only for native libraries.
if (!in_vm || Decoder::can_decode_C_frame_in_vm()) {
found = os::dll_address_to_function_name(pc, buf, buflen, &offset);
if (found) {
st->print(" %s+0x%x", buf, offset);
}
}
In all other invocations of os::dll_address_to_function_name, no call to Decoder::can_decode_C_frame_in_vm() is made.
./src/share/vm/compiler/disassembler.cpp: found = os::dll_address_to_function_name(adr, buf, sizeof(buf), &offset);
./src/share/vm/utilities/nativeCallStack.cpp: if (os::dll_address_to_function_name(pc, buf, sizeof(buf), &offset)) {
./src/share/vm/runtime/fprofiler.cpp: if (os::dll_address_to_function_name(epc.pc(), buf, sizeof(buf), NULL)) {
./src/share/vm/runtime/frame.cpp: // function name - os::dll_address_to_function_name() may return confusing
./src/share/vm/runtime/frame.cpp: found = os::dll_address_to_function_name(pc, buf, buflen, &offset);
So, is (!in_vm || Decoder::can_decode_C_frame_in_vm()) really necessary (this seems to be a Windows-only thing). If it is, we should move the check into os::dll_address_to_function_name, or else people will just forget (or not know) to call it.
bool in_vm = os::address_is_in_vm(pc);
// function name - os::dll_address_to_function_name() may return confusing
// names if pc is within jvm.dll or libjvm.so, because JVM only has
// JVM_xxxx and a few other symbols in the dynamic symbol table. Do this
// only for native libraries.
if (!in_vm || Decoder::can_decode_C_frame_in_vm()) {
found = os::dll_address_to_function_name(pc, buf, buflen, &offset);
if (found) {
st->print(" %s+0x%x", buf, offset);
}
}
In all other invocations of os::dll_address_to_function_name, no call to Decoder::can_decode_C_frame_in_vm() is made.
./src/share/vm/compiler/disassembler.cpp: found = os::dll_address_to_function_name(adr, buf, sizeof(buf), &offset);
./src/share/vm/utilities/nativeCallStack.cpp: if (os::dll_address_to_function_name(pc, buf, sizeof(buf), &offset)) {
./src/share/vm/runtime/fprofiler.cpp: if (os::dll_address_to_function_name(epc.pc(), buf, sizeof(buf), NULL)) {
./src/share/vm/runtime/frame.cpp: // function name - os::dll_address_to_function_name() may return confusing
./src/share/vm/runtime/frame.cpp: found = os::dll_address_to_function_name(pc, buf, buflen, &offset);
So, is (!in_vm || Decoder::can_decode_C_frame_in_vm()) really necessary (this seems to be a Windows-only thing). If it is, we should move the check into os::dll_address_to_function_name, or else people will just forget (or not know) to call it.
- relates to
-
JDK-8144491 ElfSymbolTable::lookup returns bad value when the lookup has failed
-
- Resolved
-
-
JDK-7071311 Decoder enhancement
-
- Closed
-
-
JDK-8185712 [windows] Improve native symbol decoder
-
- Resolved
-