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

Remove allocation when getting EventHandler

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P3 P3
    • 15
    • 14
    • hotspot
    • jfr
    • b08

      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.

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

              Created:
              Updated:
              Resolved: