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

Remove allocation when getting EventHandler

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 14
    • Fix Version/s: 15
    • Component/s: hotspot
    • Subcomponent:
      jfr
    • Resolved In Build:
      b08

      Description

      JFR allocates Java objects during normal operation. It's not many objects, but they do show up during allocation profiling, and they could trigger a GC in an application written to not allocate.

      The place where most of the allocation occurs (excluding object allocated during startup) is in Ultils.getHandler(Class) in the jdk.jfr.internal package. It's not possible to cache information about the field due to memory leaks, so the field has to be looked up everytime JFR needs to map an event class to an event handler. This happens at least once every chunk

      This can be avoided by writing the lookup in native.

        Attachments

          Activity

            People

            • Assignee:
              egahlin Erik Gahlin
              Reporter:
              egahlin Erik Gahlin
            • Votes:
              2 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: