Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8080650

Enable stubs to use frame pointers correctly

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 8, 9
    • Fix Version/s: 9
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b89
    • CPU:
      x86

      Backports

        Description

        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).

          Issue Links

            Activity

            Hide
            hgupdate HG Updates added a comment -
            URL: http://hg.openjdk.java.net/jdk9/hs-comp/hotspot/rev/cf43bef12125
            User: zmajo
            Date: 2015-10-15 19:21:56 +0000
            Show
            hgupdate HG Updates added a comment - URL: http://hg.openjdk.java.net/jdk9/hs-comp/hotspot/rev/cf43bef12125 User: zmajo Date: 2015-10-15 19:21:56 +0000
            Hide
            hgupdate HG Updates added a comment -
            URL: http://hg.openjdk.java.net/jdk9/jdk9/hotspot/rev/cf43bef12125
            User: lana
            Date: 2015-10-28 19:24:52 +0000
            Show
            hgupdate HG Updates added a comment - URL: http://hg.openjdk.java.net/jdk9/jdk9/hotspot/rev/cf43bef12125 User: lana Date: 2015-10-28 19:24:52 +0000

              People

              • Assignee:
                zmajo Zoltan Majo
                Reporter:
                zmajo Zoltan Majo
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: