RFR: 8342818: Implement CPU Time Profiling for JFR [v20]
Jaroslav Bachorik
jbachorik at openjdk.org
Wed Nov 13 08:33:35 UTC 2024
On Mon, 11 Nov 2024 15:32:15 GMT, Erik Gahlin <egahlin at openjdk.org> wrote:
>> Johannes Bechberger has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Fix ActiveSetting event for CPUTimeSamples
>
> src/jdk.jfr/share/classes/jdk/jfr/internal/util/TimespanRate.java line 50:
>
>> 48: return new TimespanRate(Runtime.getRuntime().availableProcessors() / (period / 1_000_000_000.0), false);
>> 49: }
>> 50: return new TimespanRate(Rate.of(text).perSecond(), true);
>
> What if the rate contained in text is not valid? Shouldn't it be:
>
> Rate r = Rate.of(text);
> return r == null ? null : new TimespanRate(r.perSecond(), true);
This has been fixed in [9cafdbc8fe672020e2c2772b1b3f315bb12a356e](https://github.com/openjdk/jdk/commit/9cafdbc8fe672020e2c2772b1b3f315bb12a356e) by @parttimenerd
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20752#discussion_r1839735264
More information about the hotspot-dev
mailing list