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

JFR: Incorrect verification of mirror events

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 16
    • Fix Version/s: 17
    • Component/s: hotspot
    • Labels:
      None
    • Subcomponent:
      jfr
    • Resolved In Build:
      b20

      Description

      Events defined in the java.base module can't reference annotations in the jdk.jfr due to a circular module dependency at compile time.

      To work around the issue, the concept of a mirror event was introduced. It adds annotation such as jdk.jfr.Label to a mirror class in the jdk.jfr module but with a target class located in java.base.

      To make sure the event class and the mirror have the exact same fields, a verification method was added to the jdk.jfr.internal.jfr.Utils class. Unfortunately the verification mechanism can't handle all cases, and in particular when a field is added to java.lang.Object. This is not a problem in the product, since mirror events are only used internally, but it prevents experimentation, for example to add a field to java.lang.Object.

      See attached patch file.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              egahlin Erik Gahlin
              Reporter:
              egahlin Erik Gahlin
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: