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

Kim Barrett kbarrett at openjdk.org
Fri Jun 9 09:08:51 UTC 2023


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

> > There are a lot of uses of the options that have casts, many of which ought to be removable with this change. Some of those might pull more tangled strings, but it would be nice if there was a plan to look at those too.
> 
> During this change, I changed all the cases that I found them to be changed. Would you please, give some examples or some 'search criteria' that I can use to find the cases. Then, I will do them here in this PR or create a new RFE for them. 

I spotted some when looking earlier, but haven't re-found any of them.

>> src/hotspot/share/utilities/globalDefinitions.hpp line 441:
>> 
>>> 439: // max_uintx            0xFFFFFFFF      0xFFFFFFFFFFFFFFFF
>>> 440: 
>>> 441: typedef unsigned int uint;   NEEDS_CLEANUP
>> 
>> Unrelated, but I wonder why this "NEEDS_CLEANUP"?
>
> Maybe, it is because the `uint` is already defined within the guarded lines 149-154: 
> ```C++
> #ifdef __USE_MISC
> /* Old compatibility names for C types.  */
> typedef unsigned long int ulong;
> typedef unsigned short int ushort;
> typedef unsigned int uint;
> #endif

I'm not seeing such a block?  Neither in the current version nor in several recent versions.  And I didn't
find `__USE_MISC` anywhere in the JDK.  I did find what it's for and where it's supposed to come from:
https://stackoverflow.com/questions/10231885/what-is-use-misc-macro-used-for

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

PR Comment: https://git.openjdk.org/jdk/pull/14259#issuecomment-1584231384
PR Review Comment: https://git.openjdk.org/jdk/pull/14259#discussion_r1224023784


More information about the hotspot-gc-dev mailing list