RFR: 8310537: Fix -Wconversion warnings in gcUtil.hpp

Coleen Phillimore coleenp at openjdk.org
Thu Jun 22 12:23:07 UTC 2023


On Thu, 22 Jun 2023 10:07:17 GMT, Axel Boldt-Christmas <aboldtch at openjdk.org> wrote:

>> Please review small changes to fix -Wconversion warnings in gc code.  See CR for details.
>> Tested with tier1 on Oracle platforms.
>
> src/hotspot/share/gc/shared/gcUtil.cpp line 89:
> 
>> 87:   // Now update the deviation and the padded average.
>> 88:   float new_avg = average();
>> 89:   float new_dev = compute_adaptive_average((float)fabsd(new_sample - new_avg),
> 
> Is JDK-6302670 still relevant, and/or are there other reasons we avoid `cmath`? This could just be `fabsf`

JDK-630267 does not seem relevant.  We should clean that up (or maybe at least the comment).  I changed these occurrences to fabs.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/14585#discussion_r1238448332


More information about the hotspot-gc-dev mailing list