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

JFR: @RemoveFields

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Fixed
    • P3
    • 22
    • 15
    • hotspot
    • jfr
    • b22

    Description

      Native JFR events can specify if an event has a duration, should record a stack trace, or include the thread the event was committed in. This is not possible with the Java API.

      The reason it was not added to the Flight Recorder API was to avoid the confusion that two levels of configuration brings. Users would need to set @StackTrace(true) to indicate they want to record stack traces and @HasStackTrace(true) to specify that the event should be able to record stack traces.

      Benefits are:

      - a more compact recording file
      - less overhead
      - consistency with native events
      - less noise when events are visualized
      - no test logic to whitelist unwanted settings.

      It may make sense to fix this in two phases. In the first phase, the annotation can be added to jdk.jfr.internal package and only available to events defined in the JDK. In the second phase, the annotation can be moved into the public jdk.jfr package with a corresponding CSR. Moving it into the public may require some deeper thinking on how it can be extended in the future for other metrics. For example, is there a need to set a threshold on a cpuTime field. If so, should that be a separate annotation (@CPUThreshold), part of this annotation or a more general annotation.

      Many JDK events will benefit from this annotation.

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: