8039743: Use correct format specifier to print size_t values and pointers in the GC code

Stefan Johansson stefan.johansson at oracle.com
Thu Apr 10 12:29:01 UTC 2014


Change looks good!

Thanks,
Stefan

On 2014-04-10 07:43, Stefan Karlsson wrote:
> On 2014-04-10 00:42, Jon Masamitsu wrote:
>> http://cr.openjdk.java.net/~stefank/8039743/webrev.00/src/share/vm/memory/defNewGeneration.cpp.udiff.html 
>>
>>
>> -    gclog_or_tty->print(" (promotion failure size = " SIZE_FORMAT ") ",
>> +    gclog_or_tty->print(" (promotion failure size = %u) ",
>>                          old->size());
>>
>>
>> size() returning an int, did you want %d instead of %u?
>
> OK. I'll change it to %d.
>
>>
>> Rest looks good.
>
> Thanks for reviewing!
>
> StefanK
>
>>
>> Jon
>>
>> On 04/09/2014 06:36 AM, Stefan Karlsson wrote:
>>> Hi all,
>>>
>>> There are a number of occurrence in HotSpot that use %d and 0x%x to 
>>> print size_t values and pointers. This is incorrect on platforms 
>>> that have different type sizes for size_t and pointers compared to 
>>> ints.
>>>
>>> This patch only touches the GC code, but is based on an larger patch 
>>> from Mikael Vidstedt.
>>>
>>> http://cr.openjdk.java.net/~stefank/8039743/webrev.00/
>>> https://bugs.openjdk.java.net/browse/JDK-8039743
>>>
>>> thanks,
>>> StefanK
>>
>




More information about the hotspot-gc-dev mailing list