%ld instead of %d for LogCompilation counts?

Vladimir Kozlov vladimir.kozlov at oracle.com
Sat Dec 6 00:18:54 UTC 2014


On 12/5/14 3:54 PM, John Rose wrote:
> On Dec 5, 2014, at 3:34 PM, Vladimir Kozlov <vladimir.kozlov at oracle.com
> <mailto:vladimir.kozlov at oracle.com>> wrote:
>>
>> But I am fine to change log output to long by converting it to
>> (jlong)cnt and using JLONG_FORMAT format.
>
> A problem with converting to jlong is that we don't have a good notation
> for the format string of a jlong; it differs across platforms (%lld vs.
> %I64d).  If we want to avoid an exponent, %f should work better, because
> it doesn't require a possibly-lossy value conversion.

Yes, %f works too.

For jlong we have special JLONG_FORMAT format as I pointed and I assume 
it should work on all platforms.

Vladimir

>
> — John


More information about the hotspot-compiler-dev mailing list