RFR: 8281455: Change JVM options with small ranges from 64 to 32 bits, for gc_globals.hpp [v3]

Coleen Phillimore coleenp at openjdk.org
Thu Jun 8 12:28:52 UTC 2023


On Thu, 8 Jun 2023 09:55:44 GMT, Afshin Zafari <azafari at openjdk.org> wrote:

>> The `uintx/intx` options whose ranges are small enough are changed to `uint/int`, otherwise gcc complains 
>> when `-Wconversion` is used in build.
>> Their uses in printf formats are changed accordingly.
>> 
>> ### Tests
>> Locally hotspot:tier1 tested on linux-x64
>> mach5 tiers 1-4 on Linux and Windows 64bits platforms passed.
>
> Afshin Zafari has updated the pull request incrementally with one additional commit since the last revision:
> 
>   review comments applied

This looks like a good change to me to avoid Wconversion warnings for mis-sized argument values but I'll leave it up to the GC experts.

src/hotspot/share/gc/parallel/psAdaptiveSizePolicy.cpp line 529:

> 527:           "PSAdaptiveSizePolicy::compute_old_gen_free_space: gc time limit"
> 528:           " gc_cost: %f "
> 529:           " GCTimeLimit: " UINT32_FORMAT,

Should this be %u also?

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

PR Review: https://git.openjdk.org/jdk/pull/14259#pullrequestreview-1469792200
PR Review Comment: https://git.openjdk.org/jdk/pull/14259#discussion_r1222965879


More information about the hotspot-gc-dev mailing list