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

Need more granularity to know when to spend time on JFR computations needed by specific events

    Details

    • Type: Enhancement
    • Status: Closed
    • Priority: P4
    • Resolution: Not an Issue
    • Affects Version/s: 13
    • Fix Version/s: tbd
    • Component/s: hotspot
    • Labels:
      None
    • Subcomponent:
      jfr

      Description

      While working on JDK-8185525 and JDK-8211331 a question raised about the mechanism one can use to figure out whether we need to keep collecting relevant statistics for JFR events.

      Currently we have:

      - JFR_ONLY() macro
      - Jfr::is_recording()
      - Jfr::is_enabled()

      but I don't think that these give us the required granularity.

      Imagine a computation needed by EventA. With JFR compiled in, and the recording ON and enabled, we still can not be 100% sure whether the EventA itself is being recorded or not, so we have currently no choice, but to collect the data for EventA, even when that particular event is not actually being recorded.

      We need something like Jfr::is_on(EventA)

      With JFR asking for more and more events, without such granularity we will be waisting resources and impacting the entire JFR framework by ever so slightly slowing it down as we continue to add new events.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                gziemski Gerard Ziemski
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: