RFR: 8358619: Fix interval recomputation in CPU Time Profiler
Johannes Bechberger
jbechberger at openjdk.org
Thu Jul 10 09:59:40 UTC 2025
On Tue, 1 Jul 2025 19:45:41 GMT, Andrei Pangin <apangin at openjdk.org> wrote:
>> Fixes the recomputation issue by passing either the rate or the period directly to the sampler (instead of just the rate value with the period value converted into a rate). This prevents issues when the number of cores changes during the JFR recording.
>
> src/jdk.jfr/share/classes/jdk/jfr/internal/util/TimespanRateOrPeriod.java line 59:
>
>> 57: }
>> 58:
>> 59: public static TimespanRateOrPeriod max(TimespanRateOrPeriod a, TimespanRateOrPeriod b) {
>
> `max` is not the best name for it, since it can be `min` for period or `max` for rate.
> The idea of the method is to select a value with the highest resolution, right? Let's reflect this in the name and/or code comment.
I renamed it "selectHigherResolution"
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/25775#discussion_r2197191717
More information about the hotspot-jfr-dev
mailing list