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

Enable stubs to use frame pointers correctly

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 9
    • 8, 9
    • hotspot
    • b89
    • x86

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

              zmajo Zoltan Majo (Inactive)
              zmajo Zoltan Majo (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: