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

Kim Barrett kbarrett at openjdk.org
Fri Jun 9 09:08:48 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

Changes requested by kbarrett (Reviewer).

src/hotspot/share/gc/g1/g1ConcurrentMark.cpp line 2311:

> 2309:   size_t target_size;
> 2310:   if (partially) {
> 2311:     target_size = MIN2((size_t)_task_queue->max_elems()/3, GCDrainStackTargetSize);

I was hoping max_elems() wouldn't need a cast.  Fixing that seems like it might be one of those long
and more complicated threads I was referring to earlier.

src/hotspot/share/gc/shared/gcOverheadChecker.cpp line 98:

> 96:     } else if (print_gc_overhead_limit_would_be_exceeded) {
> 97:       assert(_gc_overhead_limit_count > 0, "Should not be printing");
> 98:       log_trace(gc, ergo)("GC would exceed overhead limit of %u %% %d consecutive time(s)",

An extra space has been added before "%%"; please remove.

src/hotspot/share/gc/shared/gc_globals.hpp line 215:

> 213:   product(size_t, MarkStackSizeMax, NOT_LP64(4*M) LP64_ONLY(512*M),         \
> 214:           "Maximum size of marking stack")                                  \
> 215:           range(1, (SIZE_MAX - 1))                                          \

This is a large increase in the max size.  Not at all sure it's appropriate.  Similarly for MarkStackSize below.

src/hotspot/share/gc/shared/gc_globals.hpp line 688:

> 686:           "Number of entries we will try to leave on the stack "            \
> 687:           "during parallel gc")                                             \
> 688:           range(0, SIZE_MAX)                                                \

This is a large increase in the max on 64bit platforms.

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

PR Review: https://git.openjdk.org/jdk/pull/14259#pullrequestreview-1471493655
PR Review Comment: https://git.openjdk.org/jdk/pull/14259#discussion_r1224034883
PR Review Comment: https://git.openjdk.org/jdk/pull/14259#discussion_r1224008892
PR Review Comment: https://git.openjdk.org/jdk/pull/14259#discussion_r1224041800
PR Review Comment: https://git.openjdk.org/jdk/pull/14259#discussion_r1224043615


More information about the hotspot-gc-dev mailing list