I want to get the Assembly code for the jitted code to get the parameters value based on the Java calling convention. Suppose the JVM is hotspot, the platform is Linux 64 bit , and we have the following caller and calle, and I want to check the parameters passed to callee from the JVM core dump.
protected void caller( ) {
callee(1,"123", 123,1);
}
protected void callee(int a,String b, Integer c,Object d) {
Thread.sleep(11111111);
}
Based on the following Java calling convention, we know we can get the parameters from the Registers, such as up to 6 first integer arguments are passed in registers: rsi, rdx, rcx, r8, r9, rdi http://hg.openjdk.java.net/jdk8u/jdk8u/hotspot/file/b4bdf3484720/src/cpu/x86/vm/assembler_x86.hpp#l91
For the c/c++ method, and we can use the gdb just through the way by printting call stack by the command backtrace , then frame N(N is the thread number), then x/20i $pc-64 to get the assembly code, and we can get the value from the related frame context Register. However the Java method call stack can not be printed from gdb, and we don't know the frame number, then we cannot use the same way like c/c++ to get the assembly code,so how to check the assembly code for the Java jitted method from the core dump?
PS, Someone mentioned the PrintOptoAssembly, however I need the Assembly code to get the parameters value from the registers by calling convention(such as by backtrace , then frame N , then x/20i $pc-64 through gdb) not just the Assembly code only.