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

Interval of < 1 ms disables ExecutionSample events

    XMLWordPrintable

Details

    • jfr
    • b22

    Backports

      Description

        When using an interval of < 1 ms, no ExecutionSample events are produced:

        It works for 1ms:
        `java -XX:StartFlightRecording=filename=flight.jfr,jdk.ExecutionSample#period=1ms CLASS_FILE; jfr print --events jdk.ExecutionSample flight.jfr`
        prints events, but
        `java -XX:StartFlightRecording=filename=flight.jfr,jdk.ExecutionSample#period=999us CLASS_FILE; jfr print --events jdk.ExecutionSample flight.jfr`
        prints no events.

        This seems to be a special case for MethodSample events (https://github.com/openjdk/jdk/blob/master/src/hotspot/share/jfr/periodic/sampling/jfrThreadSampler.cpp#L493-L508): the period interval is converted into integer milliseconds for all events, converting 999us to 0ms, but only for MethodSample (ExecutionSample, ...) does a 0ms interval mean that no events are generated.

        Seems to be present in the code since the first public commit of JFR.

        Attachments

          Issue Links

            Activity

              People

                jbechberger Johannes Bechberger
                jbechberger Johannes Bechberger
                Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: