SA does not dump debug info for scalar replaced objects in codecache dump:
0xfa8d207b: call 0xfa8ab060
static int test() @0xb65b3110 of public class sleep @0xb65b3160 @ bci = 18, line = 15
locals ([0], unknown scope value sun.jvm.hotspot.code.ObjectValue@9980d5) ([1], oop 0xb65b32b0) ([2], illegal)
monitors (owner = oop 0xb65b32b0, lock = stack[16], normal)
OopMap:
Here is simple test:
public class sleep {
int iii;
public static void main(String[] args) throws Exception {
int ii = 0;
for (int i = 0; i < 2000000; i++) {
ii += test2();
}
}
static int test2() throws Exception {
return test();
}
static int test() throws Exception {
sleep sl = new sleep();
synchronized (sleep.class) {
sleep.class.wait(1);
}
return sl.iii;
}
}
% java -XX:CompileThreshold=1000 sleep &
% pwd
<hotspot_rep>/agent/make
% sh clhsdbproc.sh <pid>
% dumpcodecache >ccdump.txt
Node: the instruction "dumpcodecache" will be implemented by this bug fix.
With the fix the dump will be:
0xfa8d207b: call 0xfa8ab060
static int test() @0xb65b3110 of public class sleep @0xb65b3160 @ bci = 18, line = 15
locals ([0], #ScObj0) ([1], oop 0xb65b32b0) ([2], illegal)
monitors (owner = oop 0xb65b32b0, lock = stack[16], normal)
#ScObj0 sleep{ [iii :0]=#int 0 }
OopMap: