RFR: 8313882: Fix -Wconversion warnings in runtime code [v2]
Dean Long
dlong at openjdk.org
Wed Aug 9 01:35:32 UTC 2023
On Tue, 8 Aug 2023 23:55:42 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:
>> src/hotspot/share/runtime/arguments.cpp line 2738:
>>
>>> 2736: }
>>> 2737:
>>> 2738: if (FLAG_SET_CMDLINE(MaxTenuringThreshold, (uint)max_tenuring_thresh) != JVMFlag::SUCCESS) {
>>
>> MaxTenuringThreshold was recently changed to uint, so it would make sense change uintx above to uint.
>
> I couldn't change that one because there isn't a parse_uint() version of this:
> if (!parse_uintx(tail, &max_tenuring_thresh, 0)) {
> Which calls parse_integer into a 64 bit value.
Isn't parse_integer() used to parse int flags? It's a template.
>> src/hotspot/share/runtime/deoptimization.cpp line 255:
>>
>>> 253: result += frame_sizes()[index];
>>> 254: }
>>> 255: return checked_cast<int>(result);
>>
>> Isn't _caller_adjustment already an int?
>
> frame_sizes() returns intptr_t so I had to promote result, then demote it. frame_sizes() is a more difficult change.
>
> runtime/deoptimization.hpp: intptr_t* _frame_sizes; // Array of frame sizes, in bytes, for unrolling the stack
OK, I missed the +=.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/15177#discussion_r1287836477
PR Review Comment: https://git.openjdk.org/jdk/pull/15177#discussion_r1287836596
More information about the hotspot-dev
mailing list