JDK-8080650 : Enable stubs to use frame pointers correctly
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 8,9
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • CPU: x86
  • Submitted: 2015-05-19
  • Updated: 2016-04-27
  • Resolved: 2015-10-15
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
8u101Fixed 9 b89Fixed
Related Reports
Relates :  
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).