RFR: 8342818: Implement CPU Time Profiling for JFR [v20]
Erik Gahlin
egahlin at openjdk.org
Mon Nov 11 15:38:23 UTC 2024
On Mon, 11 Nov 2024 13:37:49 GMT, Johannes Bechberger <jbechberger at openjdk.org> wrote:
>> This is the code for the [JEP draft: CPU Time based profiling for JFR].
>
> 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);
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20752#discussion_r1836854538
More information about the hotspot-dev
mailing list