Request for review: 7102489: RFE: cleanup jlong typedef on __APPLE__ and _LP64 systems

David Holmes david.holmes at oracle.com
Thu Jan 10 23:33:42 PST 2013


Hi Harold,

On 11/01/2013 4:39 AM, harold seigel wrote:
> Hi,
>
> Please review the following changes to fix bug 7102489.
>
> Summary:
> The definition of type jlong differed on Mac OS from the other 64 bit
> platforms. This fix makes it consistent. In order to do this, this fix
> defines new macros, JLONG_FORMAT and JULONG_FORMAT, for printing and
> scanning jlongs and julongs.
>
> This fix also does some cleanup. Methods jlong_format_specifier() and
> julong_format_specifer() were removed and some format specifiers were
> replaced with appropriate macros.

General clean up looks good. As long as we have jlong and int64 types in 
use I much prefer to JLONG_FORMAT and INT64_FORMAT in the sources.

I still wonder how those os:: functions came about in the first place :)

A few comments ...

src/os/posix/launcher/java_md.h

   67 #define JLONG_FORMAT "%lld"

Doesn't this need to have both 32-bit and 64-bit variants?

--

src/os/windows/launcher/java_md.h

+ #define JLONG_FORMAT "%I64d"

Ditto ?

--

src/share/vm/utilities/globalDefinitions_gcc.hpp

Why do we need a special case for Apple? AFAIK for ILP32 and LP64 "long 
long" is always 64-bits so %lld should always be valid.

--

src/share/vm/utilities/ostream.cpp

I think the N.B comments could be deleted.

--

Thanks,
David


> Open webrev at http://cr.openjdk.java.net/~hseigel/bug_7102489/
> <http://cr.openjdk.java.net/%7Ehseigel/bug_7102489/>
> Bug link at http://bugs.sun.com/view_bug.do?bug_id=7102489
>
> Thank you,
> Harold


More information about the hotspot-runtime-dev mailing list