JDK-8281455 : Change JVM options with small ranges from 64 to 32 bits, for gc_globals.hpp
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 19
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2022-02-08
  • Updated: 2025-06-13
  • Resolved: 2023-06-27
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 22
22 b04Fixed
Related Reports
Relates :  
Sub Tasks
JDK-8289534 :  
Description
The declarations of JVM options, whose ranges are small values, should be changes from 64 bits to 32 bits.  For example, AdaptiveTimeWeight is declared as a uintx but need only be a uint.

   product(uintx, AdaptiveTimeWeight,       25,                              \
           "Weight given to time in adaptive policy, between 0 and 100")     \
           range(0, 100)                                                     \

Changing AdaptiveTimeWeight to a uint prevents -Wconversion compiler warnings when it is assigned to variables declared as uint's.
Comments
A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk/pull/14259 Date: 2023-06-01 11:15:48 +0000
13-06-2025

Changeset: 7ce967a1 Author: Afshin Zafari <azafari@openjdk.org> Date: 2023-06-27 15:54:55 +0000 URL: https://git.openjdk.org/jdk/commit/7ce967a10c62d300a11906c1d71def33f4f57719
27-06-2023

Sometimes it is the expression that the flag gets used in that determines the type - otherwise, as noted, we end up applying casts. I would not make all flags smaller just for the sake of making them smaller.
26-05-2023