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

Remove useless code cache lookup in frame::patch_pc

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 15
    • Fix Version/s: 15
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b18

      Description

      This code cache lookup is useless because the method is only called from frame::deoptimize and vframeArrayElement::unpack_on_stack where pc is always part of _cb:
      http://hg.openjdk.java.net/jdk/jdk/file/ee44884f3ab8/src/hotspot/cpu/x86/frame_x86.cpp#l265

      If the method is called from frame::deoptimize, pc is either _cb->deopt_mh_handler_begin() or _cb->deopt_handler_begin(). Both are part of _cb:
      http://hg.openjdk.java.net/jdk/jdk/file/ee44884f3ab8/src/hotspot/share/runtime/frame.cpp#l287

      If the method is called from vframeArrayElement::unpack_on_stack, _frame is an interpreter frame and therefore _frame._cb is the interpreter buffer blob. pc is only set in this method and always points to an interpreter entry which should be part of the interpreter buffer blob:
      http://hg.openjdk.java.net/jdk/jdk/file/ee44884f3ab8/src/hotspot/share/runtime/vframeArray.cpp#l303

        Attachments

          Activity

            People

            Assignee:
            thartmann Tobias Hartmann
            Reporter:
            thartmann Tobias Hartmann
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: