# HG changeset patch # User ysuenaga # Date 1571792546 -32400 # Node ID 083bbca50d2d27319535a1e8c05d14649e944653 # Parent a6c56d661d753f00a40ecbb057e1d8b4ae417954 8232592: is shown in jstack mixed mode Reviewed-by: cjplummer, phh diff -r a6c56d661d75 -r 083bbca50d2d src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/tools/PStack.java --- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/tools/PStack.java Tue Oct 22 23:55:33 2019 +0200 +++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/tools/PStack.java Wed Oct 23 10:02:26 2019 +0900 @@ -130,10 +130,19 @@ if (c.contains(pc)) { CodeBlob cb = c.findBlobUnsafe(pc); if (cb.isNMethod()) { - names = getJavaNames(th, f.localVariableBase()); - // just print compiled code, if can't determine method - if (names == null || names.length == 0) { - out.println(""); + if (cb.isNativeMethod()) { + out.print(((CompiledMethod)cb).getMethod().externalNameAndSignature()); + long diff = pc.minus(cb.codeBegin()); + if (diff != 0L) { + out.print(" + 0x" + Long.toHexString(diff)); + } + out.println(" (Native method)"); + } else { + names = getJavaNames(th, f.localVariableBase()); + // just print compiled code, if can't determine method + if (names == null || names.length == 0) { + out.println(""); + } } } else if (cb.isBufferBlob()) { out.println("");