RFR: 8337501: JFR: Use TimespanUnit

Markus Grönlund mgronlun at openjdk.org
Wed Jul 31 17:05:32 UTC 2024


On Tue, 30 Jul 2024 17:27:51 GMT, Erik Gahlin <egahlin at openjdk.org> wrote:

> 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

Marked as reviewed by mgronlun (Reviewer).

-------------

PR Review: https://git.openjdk.org/jdk/pull/20392#pullrequestreview-2210704676


More information about the hotspot-jfr-dev mailing list