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

Trace event for thread park has incorrect unit for timeout

    XMLWordPrintable

Details

    • jfr
    • b24

    Backports

      Description

        In trace.xml the ThreadPark event has the following timeout definition:
        <value type="MILLIS" field="timeout" label="Park Timeout"/>
        and the trace code copies the "time" jlong passed to Unsafe::park right into the timeout field in the event.

        The problem is that the specification for Unsafe::park is a bit more complex than that.
        * If the "isAbsolute" jboolean is true then the interpretation of the "time" parameter should be a "milliseconds since epoch" timestamp.
        * If "isAbsolute" is false then the interpretation of the "time" parameter should be a timeout in nanoseconds relative to "now".

        The first case appears to require the EPOCHMILLIS type whereas the second case requires the NANOS type so the current implementation is incorrect for any value of "isAbsolute"

        Attachments

          Issue Links

            Activity

              People

                egahlin Erik Gahlin
                mgerdin Mikael Gerdin (Inactive)
                Votes:
                0 Vote for this issue
                Watchers:
                9 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: