RFR: 8039957: Replace the last few %p usages with PTR_FORMAT in the GC code

Stefan Johansson stefan.johansson at oracle.com
Fri Apr 11 08:12:50 UTC 2014


Looks good Stefan,

On 2014-04-11 07:48, Stefan Karlsson wrote:
> On 2014-04-11 00:42, Jesper Wilhelmsson wrote:
>> 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.
>
> Yes, I agree. Unless someone complains I'll change it to SIZE_FORMAT_HEX.
+1

StefanJ
>
>>
>> Apart for that it looks good!
>
> Thanks for the review.
>
> StefanK
>
>> /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