RFR: 7855: JFR Writer incorrectly uses epoch nanoseconds as the start ticks [v3]
Jaroslav Bachorik
jbachorik at openjdk.org
Thu Oct 6 08:28:28 UTC 2022
> 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 incrementally with two additional commits since the last revision:
- Outstanding 'duration' fixes and cleanup
- Update and formalize new jfr.writer dependencies
-------------
Changes:
- all: https://git.openjdk.org/jmc/pull/412/files
- new: https://git.openjdk.org/jmc/pull/412/files/d0e5225d..dfedb3f7
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jmc&pr=412&range=02
- incr: https://webrevs.openjdk.org/?repo=jmc&pr=412&range=01-02
Stats: 29 lines in 5 files changed: 18 ins; 6 del; 5 mod
Patch: https://git.openjdk.org/jmc/pull/412.diff
Fetch: git fetch https://git.openjdk.org/jmc pull/412/head:pull/412
PR: https://git.openjdk.org/jmc/pull/412
More information about the jmc-dev
mailing list