RFR: 8281455: Change JVM options with small ranges from 64 to 32 bits, for gc_globals.hpp [v2]
Afshin Zafari
azafari at openjdk.org
Wed Jun 7 11:37:02 UTC 2023
On Wed, 7 Jun 2023 09:30:46 GMT, Thomas Schatzl <tschatzl at openjdk.org> wrote:
>> Afshin Zafari has updated the pull request incrementally with one additional commit since the last revision:
>>
>> some more intx to int conversions.
>
> src/hotspot/share/gc/parallel/psAdaptiveSizePolicy.cpp line 352:
>
>> 350: "PSAdaptiveSizePolicy::compute_eden_space_size: gc time limit"
>> 351: " gc_cost: %f "
>> 352: " GCTimeLimit: " UINT32_FORMAT,
>
> We use `%u` as format specifiers for uint.
`%u` is used.
> src/hotspot/share/gc/shared/gcOverheadChecker.cpp line 94:
>
>> 92: if (UseGCOverheadLimit) {
>> 93: if (gc_overhead_limit_exceeded()) {
>> 94: log_trace(gc, ergo)("GC is exceeding overhead limit of %d%%", GCTimeLimit);
>
> Not sure why this place uses `%d` as format specifier compared to the `UINT32_FORMAT` the previous places did. Use `%u` ;)
`%u` is used.
> src/hotspot/share/gc/shared/gc_globals.hpp line 169:
>
>> 167: "(effective only when using concurrent collectors)") \
>> 168: \
>> 169: product(uint, GCLockerEdenExpansionPercent, 5, \
>
> The `` needs to be aligned back.
Fixed.
> src/hotspot/share/utilities/globalDefinitions.hpp line 442:
>
>> 440:
>> 441: typedef unsigned int uint; NEEDS_CLEANUP
>> 442: const uint max_uint = (uint)-1;
>
> The change should use the existing `UINT_MAX` instead of adding a new constant. Instead of a cast of `-1`, one should also use `~0` to get all-ones.
`UINT_MAX` is used. New definition of max_uint is removed.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/14259#discussion_r1221420802
PR Review Comment: https://git.openjdk.org/jdk/pull/14259#discussion_r1221421539
PR Review Comment: https://git.openjdk.org/jdk/pull/14259#discussion_r1221421846
PR Review Comment: https://git.openjdk.org/jdk/pull/14259#discussion_r1221423013
More information about the hotspot-gc-dev
mailing list