RFR: 8039957: Replace the last few %p usages with PTR_FORMAT in the GC code
Jesper Wilhelmsson
jesper.wilhelmsson at oracle.com
Thu Apr 10 22:42:04 UTC 2014
Hi Stefan,
Thanks for cleaning this up!
Not that I care too much about the particular code in question, but I think it
is weird to print a size_t using PTR_FORMAT. I assume it is done to get a hex
format of the number, if so I'd prefer a SIZE_FORMAT_HEX if such a format
specifier exists. (If not, and you intent to add it I would prefer
SIZE_HEX_FORMAT.) The risk of using PTR_FORMAT is that people might find it and
think it is the way to get hex formated size_t.
Apart for that it looks good!
/Jesper
Stefan Karlsson skrev 10/4/14 21:25:
> Please, review this small patch the GC code to replace the last few usages of %p
> with PTR_FORMAT.
>
> http://cr.openjdk.java.net/~stefank/8039957/webrev.00/
> https://bugs.openjdk.java.net/browse/JDK-8039957
>
> One of the instances used %p to print a size_t. I decided to cast the value to
> pointer instead of using SIZE_FORMAT. I'll be happy to change it to SIZE_FORMAT
> or SIZE_FORMAT_HEX if anyone cares and has an opinion about this unused piece of
> code. :)
>
> thanks,
> StefanK
More information about the hotspot-gc-dev
mailing list