RFR: 8337501: JFR: Use TimespanUnit
Erik Gahlin
egahlin at openjdk.org
Tue Jul 30 19:20:39 UTC 2024
Could I have a review of change that updates the JFR code to use the newly introduced TimespanUnit enum. The enum is updated to use j.u.c.TimeUnit enum so the method TimeUnit::toNanos can be leveraged. It can handle over- and underflow properly.
Path forward is to introduce a Timespan class, similar to the Rate class, that will prevent negative values, parse "infinity" and provide means to compare values. This will consolidate code further.
Testing: test/jdk/jdk/jfr
Thanks
Erik
-------------
Commit messages:
- Move initialization in constructor
- Initial
Changes: https://git.openjdk.org/jdk/pull/20392/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=20392&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8337501
Stats: 57 lines in 4 files changed: 10 ins; 22 del; 25 mod
Patch: https://git.openjdk.org/jdk/pull/20392.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/20392/head:pull/20392
PR: https://git.openjdk.org/jdk/pull/20392
More information about the hotspot-jfr-dev
mailing list