Integrated: 8337501: JFR: Use TimespanUnit

Erik Gahlin egahlin at openjdk.org
Wed Jul 31 18:01:34 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

This pull request has now been integrated.

Changeset: a45bb55d
Author:    Erik Gahlin <egahlin at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/a45bb55ddb6abfa520a2e4d7a5cd4d638a526efd
Stats:     57 lines in 4 files changed: 10 ins; 22 del; 25 mod

8337501: JFR: Use TimespanUnit

Reviewed-by: mgronlun

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

PR: https://git.openjdk.org/jdk/pull/20392


More information about the hotspot-jfr-dev mailing list