Loading... (original) (raw)
MacroAssembler::verified_entry() genereates, in some cases, code that uses frame pointers incorrectly. For example, in the _new_array_Java stub (see excerpt below), RBP is not set to point to the stack location where the caller's frame is stored. As a result, perf (and other tools as well) is not be able to walk the stack in this case.
java -XX:+PrintStubCode -XX:+PreserveFramePointer -version > out
Decoding RuntimeStub - _new_array_Java 0x00007f09dd17ab10
;; N1: # B1 <- B3 B2 Freq: 1
;; B1: # B3 B2 <- BLOCK HEAD IS JUNK Freq: 1
0x00007f09dd17ab60: sub $0x8,%rsp
0x00007f09dd17ab67: mov %rbp,(%rsp)
0x00007f09dd17ab6b: mov %rsp,%rbp # RBP points to the beginning of the stack at this point (correct).
0x00007f09dd17ab6e: add $0x8,%rbp # This instruction changes the value in RBP (incorrect).