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

JVMTI spec needs to clarify when OPAQUE_FRAME is thrown for reasons other than a native method

XMLWordPrintable

    • Icon: CSR CSR
    • Resolution: Unresolved
    • Icon: P4 P4
    • 26
    • hotspot
    • None
    • minimal
    • Hide
      The compatibility risk is minimal as this update just makes descriptions/clarifications for several JVMTI_ERROR_OPAQUE_FRAME error code cases more consistent.
      Show
      The compatibility risk is minimal as this update just makes descriptions/clarifications for several JVMTI_ERROR_OPAQUE_FRAME error code cases more consistent.
    • Other

      Summary

      This update makes several clarifications for JVMTI_ERROR_OPAQUE_FRAME error code cases more consistent.

      Problem

      Several JVMTI functions can return the JVMTI_ERROR_OPAQUE_FRAME error code. There can be several reasons to return it. The clarifications for reasons other than a native frame case have are inconsistent sometimes.

      Solution

      Polish the impacted JVMTI functions spec to make it more consistent.

      Specification

      The following three kinds of JVMTI functions are impacted:

      • PopFrame
      • NotifyFramePop
      • ForceEarlyReturn<Type>

      There changes are:

      In PopFrame spec for JVMTI_ERROR_OPAQUE_FRAME case, replace:

      Called or calling method is a native method.
      The implementation is unable to pop this frame.

      with:

        The implementation is unable to pop this frame
        (e.g. called or calling method is a native method).

      In NotifyFramePop spec for JVMTI_ERROR_OPAQUE_FRAME case, replace:

      "The frame at <code>depth</code> is executing a native method."

      with:

      "The implementation is unable to set a FramePop event for the frame"
      (e.g. the frame at depth</code> is executing a native method)." 

      In ForceEarlyReturn<Type> specs (full list if functions: ForceEarlyReturnObject, ForceEarlyReturnint, ForceEarlyReturnLong, ForceEarlyReturnFloat, ForceEarlyReturnDouble, ForceEarlyReturnVoid), for JVMTI_ERROR_OPAQUE_FRAME case, replace:

      "Attempted to return early from a frame
      corresponding to a native method."

      with:

      "The implementation is unable to force current frame to return
      (e.g. current frame is executing a native method)."

      In the general description of the JVMTI_ERROR_OPAQUE_FRAME error code, replace:

      "or the function cannot be performed on the thread's current frame."

      with:

      "or the implementation is unable to provide this functionality on this frame."

            sspitsyn Serguei Spitsyn
            cjplummer Chris Plummer
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated: