RFR: 8342818: Implement JEP 509: JFR CPU-Time Profiling [v5]

Johannes Bechberger jbechberger at openjdk.org
Mon May 26 14:13:56 UTC 2025


On Mon, 26 May 2025 14:04:14 GMT, Markus Grönlund <mgronlun at openjdk.org> wrote:

>> My code is the inversion of
>> 
>> 
>> template <typename TimeSource, const int unit>
>> inline double conversion(typename TimeSource::Type& value) {
>>   return (double)value * ((double)unit / (double)TimeSource::frequency());
>> }
>
> (value * (unit / frequency)) != (value / unit * frequency)

The mentioned conversion is from ticks to time unit:

nanos = ticks * 1_000_000_000 / frequency

therefore

nanos / 1_000_000_000 * frequency = ticks

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

PR Review Comment: https://git.openjdk.org/jdk/pull/25302#discussion_r2107432668


More information about the hotspot-jfr-dev mailing list