[9] RFR(L): 8037816 : Fix for 8036122 breaks build with Xcode5/clang

David Chase david.r.chase at oracle.com
Wed Apr 30 11:47:24 UTC 2014


On 2014-04-30, at 2:14 AM, Vladimir Kozlov <vladimir.kozlov at oracle.com> wrote:

> David,
> 
> Thank you for fixing vm_version files.
> 
> In c1_LIR.cpp, c1_Runtime1.cpp, ciInstanceKlass.cpp, ciMetadata.cpp, ciObject.cpp not all 0x%" PRIxPTR were replaced by PTR_FORMAT.
> 
> I see you kept a lot of '0x" PRIxPTR' instead of using INTPTR_FORMAT (or PTR_FORMAT) when printing (p2i) pointers. Why?
> Files c1_LIR.cpp, c1_Runtime1.cpp, ciInstanceKlass.cpp, ciMetadata.cpp, ciObject.cpp, markOop.cpp.

I'm reluctant to do that, since it changes the output, from 0xbeef to 0x0000beef or 0x000000000000beef.
Is that really acceptable?

> memnode.cpp - for printing intptr_t values we should use INTX_FORMAT.

got that -- this is as opposed to PRIdPTR, right?

> arguments.cpp - not all (unsigned int) were replaced.

got that -- two more.

> I see that you enable by default ATTRIBUTE_PRINTF for print() and print_cr(). Does it mean they are checked by clang and gcc? I am for that if it is true otherwise they will degrade. I remember in first review you commented it. So I missed when it was enabled.

I enabled it because of taking to Coleen; it seemed like an extremely good idea.

> General question for not these changes. Do we still need PTR_FORMAT since you used p2i() for all pointer values which use INTPTR_FORMAT? Their definition are the same. Why keep both?

I have no idea.  Whoever provided the macros did not give much guidance.  PTR_FORMAT is shorter.

David



More information about the hotspot-dev mailing list