review request for 6781583
Xiaobin.Lu at Sun.COM
Fri Dec 5 18:40:21 PST 2008
Webrev updated: http://webrev.invokedynamic.info/xiaobin.lu/6781583/webrev/
Thanks to everyone who replied to my review request. I did a full
compilation on Ubuntu 8.10 and notice that the product build actually
generated some other compilation errors. I believe these were discussed
So I made some more changes and now the compilation succeeds on both
jvmg and product build. The build also passed on latest OpenSolaris build.
Here is some explanation on the changes:
1. I modified "jlong" definition to make it conform with the definition
on JDK side. This change will make the complaint about using
INT64_FORMAT to print data types with "long long". So now, it is perfect
ok to use INT64_FORMAT to print jlong.
2. There is some weird change in javaClasses.cpp which casts "nmethod*
nm" to "intptr_t". This has to be done since otherwise, gcc will
complain about using PTR_FORMAT (which isn't defined as "%p", but as
"0x%016x") to print nmethod*. We could change PTR_FORMAT to use %p, but
"%p" has its own issue since it does not prepend "0x" to the data on
Windows & Solaris. So I would rather leave that as is for now.
3. I added a few return values on some system/library calls to avoid
compiler error. I believe it is better to fix these places rather than
just removing "-Werror" from gcc.make. Luckily, we don't have many of those.
Feel free to let me know your thoughts.
Xiaobin Lu wrote:
> Webrev: http://webrev.invokedynamic.info/xiaobin.lu/6781583/webrev/
> Due to more restrictions on implicit type conversion put to the latest
> GCC compiler such as GCC 4.3.2, the hotspot build fails on 64 bit
> platforms. I've fixed part of the problem on 32 bit platform with
> 6718830 & 6681796, however, I just noticed that we need to do more on
> 64 bit platforms as well.
> One of the thing you might notice with the fix is that I explicitly
> use "%lld" to print jlong instead of using PTR_FORMAT. The reason of
> doing this is that jlong is defined as "long long int", and PTR_FORMAT
> is actually used to print "long int" on 64 bit platforms. GCC 4.3.2
> doesn't even allow conversions between "long long" and "long" even
> though they have the same size on most of today's 64 bit platforms.
> Other part of the fix is pretty straightforward.
> Reviewed by:
> Verified by:
> Built on 32 bit GCC 4.3.2 and it succeeded
More information about the hotspot-dev