RFR: 8310577: Fix -Wconversion warnings in interpreter and oops [v2]

Coleen Phillimore coleenp at openjdk.org
Thu Jun 22 14:19:19 UTC 2023


On Thu, 22 Jun 2023 13:12:36 GMT, Frederic Parain <fparain at openjdk.org> wrote:

>> Coleen Phillimore has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Fred's suggestion.
>
> src/hotspot/share/interpreter/invocationCounter.hpp line 71:
> 
>> 69:   bool carry() const               { return (_counter & carry_mask) != 0; }
>> 70:   uint count() const               { return _counter >> number_of_noncount_bits; }
>> 71:   uint limit() const               { return (uint)CompileThreshold; }
> 
> CompileThreshold is an intx, and can be set by users on the command line. Casting it to uint looks wrong. This method seems to be used in only one place (invocationCounter.cpp:69), so changing the return type of the method to intx and fixing the print statement where it is used could be a better fix.

That was a good suggestion.  Thank you!

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

PR Review Comment: https://git.openjdk.org/jdk/pull/14604#discussion_r1238595427


More information about the hotspot-dev mailing list