RFR: 8291953: Remove PTR32_FORMAT macros

Kim Barrett kim.barrett at oracle.com
Fri Aug 5 11:36:04 UTC 2022



> On Aug 5, 2022, at 3:59 AM, Stefan Karlsson <stefank at openjdk.org> wrote:
> 
> On Fri, 5 Aug 2022 07:19:13 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:
> 
>> Please review this change to remove the PTR32_FORMAT macro.
>> 
>> And the idea of hard-coded 32bit pointers is bad; we already have the
>> PTR_FORMAT macros that deal with the 32/64bit distinction for pointers, and
>> those should be used for such.
>> 
>> However, all uses of PTR32_FORMAT are actually with values that are real uint
>> values, not (converted) pointers. They should just use "%u" instead.  So we
>> can eliminate PTR32_FORMAT.
>> 
>> The unused PTR32_FORMAT_W is is also removed.
>> 
>> Testing:
>> mach5 tier1
> 
> Wouldn't it be more appropriate to change this to bring hex values instead? I guess that was the original intention of using a PTR format specifier.

Shoot, they’re supposed to be hex!  Bleh!

> Also, are you going to remove the PTR64_FORMAT as well?

Probably, but uses of it are more of a mixed bag.  Some are dealing with pointers
(converted via p2i) and some are dealing with [u]int64_t and should be using some
other xxx_FORMAT entirely (or perhaps one of the new C99 directives).



More information about the hotspot-dev mailing list