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

[lworld] Handle deoptimization when buffering scalarized inline type args in C1

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P2
    • Resolution: Fixed
    • Affects Version/s: repo-valhalla
    • Fix Version/s: repo-valhalla
    • Component/s: hotspot
    • Labels:

      Description

      When calling from C2 to C1 compiled code (i.e, no adapter in between) we need to buffer scalarized value type arguments in the C1 compiled entry point of the method (because C1 requires an oop). To do that, we might need to call into the runtime and that call might trigger deoptimization of the C1 compiled caller. That's a problem because the arguments are still scalarized and neither the deopt code nor the interpreter know how to handle that state. It's not a problem for all the other cases where buffering is necessary because it's either in the c2i adapter or C2 compiled code where we can handle this already.

      Ideas:
      - Stripping the frame corresponding to the C1 compiled method and re-executing the call in caller frame
      - Just not deoptimize that frame and continue until the next safepoint
      - Magically continue execution in the c2i adapter (for example, by patching return pc to a special deopt handler)
      - Buffer in the deopt logic (similar to what we do for C2)

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: