RFR: 7855: JFR Writer incorrectly uses epoch nanoseconds as the start ticks [v2]
Marcus Hirt
hirt at openjdk.org
Wed Sep 28 17:08:28 UTC 2022
On Fri, 15 Jul 2022 13:28:05 GMT, Jaroslav Bachorik <jbachorik at openjdk.org> wrote:
>> Currently, the JFR recordings created by the JMC writer will have the start ticks set to the same value as the start timestamp. This will cause problems with the duration calculation which is using directly `System.nanoTime()` and as such the resulting value will be rather nonsensical.
>>
>> This PR adds two new recording settings - `startTicks` and `duration` which can be used to write a JFR recording with correct values set. If the user does not set those settings `startTicks` will be set to the value of `System.nanoTime()` at the moment the recording is started (a `Recording` instance is created) and `duration` will be computed as a diff between the current value of `System.nanoTime()` and `startTicks`.
>
> Jaroslav Bachorik has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains three additional commits since the last revision:
>
> - Update copyrights
> - Merge branch 'master' into jb/JMC-7855
> - JMC-7855: JFR Writer incorrectly uses epoch nanoseconds as the start ticks
@jbachorik - anything left before taking this one? See @RealCLanger's comment.
-------------
PR: https://git.openjdk.org/jmc/pull/412
More information about the jmc-dev
mailing list