[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-hotspot-runtime-dev
Subject:    jdk9 (fastdebug) build failed with gcc version 4.4.7-16
From:       KUBOTA Yuji <kubota.yuji () gmail ! com>
Date:       2016-03-28 10:22:29
Message-ID: CABU-27OFOHRyUbtm12F+Q5iZ_7onHirXE1XPNsPi9=LdP6R50w () mail ! gmail ! com
[Download RAW message or body]

Hi everyone,

I just cloned jdk9/dev and built fastdebug, then failed as similar as
JDK-8047382 [1].

/mockbuild/jdk9/dev/hotspot/src/share/vm/services/classLoadingService.cpp:
In static member function 'static void
ClassLoadingService::notify_class_loaded(InstanceKlass*, bool)':
/mockbuild/jdk9/dev/hotspot/src/share/vm/services/classLoadingService.cpp:147:
error: cannot reload integer constant operand in 'asm'
/mockbuild/jdk9/dev/hotspot/src/share/vm/services/classLoadingService.cpp:147:
error: cannot reload integer constant operand in 'asm'
gmake[8]: *** [classLoadingService.o] Error 1

As Lois said at JDK-8047382 [1], the HS_DTRACE_PROBE# macros
has been removed in JDK9. However, similar macros has came back
by JDK-7098194 [2], then failed when we used specified gcc version.
So I create a patch to fix it.

Should I create a new issue at JBS, or wait to remove the macros again?

[1]: https://bugs.openjdk.java.net/browse/JDK-8047382
[2]: https://bugs.openjdk.java.net/browse/JDK-7098194

The gcc version of my build machine is:
Using built-in specs.
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info
--with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap
--enable-shared --enable-threads=posix --enable-checking=release
--with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-gnu-unique-object
--enable-languages=c,c++,objc,obj-c++,java,fortran,ada
--enable-java-awt=gtk --disable-dssi
--with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre
--enable-libgcj-multifile --enable-java-maintainer-mode
--with-ecj-jar=/usr/share/java/eclipse-ecj.jar
--disable-libjava-multilib --with-ppl --with-cloog --with-tune=generic
--with-arch_32=i686 --build=x86_64-redhat-linux
Thread model: posix
gcc version 4.4.7 20120313 (Red Hat 4.4.7-16) (GCC)

My proposal patch is:

diff --git a/src/share/vm/oops/instanceKlass.cpp
b/src/share/vm/oops/instanceKlass.cpp
--- a/src/share/vm/oops/instanceKlass.cpp
+++ b/src/share/vm/oops/instanceKlass.cpp
@@ -92,7 +92,7 @@
       len = name->utf8_length();                                 \
     }                                                            \
     HOTSPOT_CLASS_INITIALIZATION_##type(                         \
-      data, len, (clss)->class_loader(), thread_type);           \
+      data, len, (void *)(clss)->class_loader(), thread_type);           \
   }

 #define DTRACE_CLASSINIT_PROBE_WAIT(type, clss, thread_type, wait) \
@@ -105,7 +105,7 @@
       len = name->utf8_length();                                 \
     }                                                            \
     HOTSPOT_CLASS_INITIALIZATION_##type(                         \
-      data, len, (clss)->class_loader(), thread_type, wait);     \
+      data, len, (void *)(clss)->class_loader(), thread_type, wait);     \
   }

 #else //  ndef DTRACE_ENABLED
diff --git a/src/share/vm/services/classLoadingService.cpp
b/src/share/vm/services/classLoadingService.cpp
--- a/src/share/vm/services/classLoadingService.cpp
+++ b/src/share/vm/services/classLoadingService.cpp
@@ -52,7 +52,7 @@
       len = name->utf8_length();                    \
     }                                               \
     HOTSPOT_CLASS_##type( /* type = unloaded, loaded */ \
-      data, len, (clss)->class_loader(), (shared)); \
+      data, len, (void *)(clss)->class_loader(), (shared)); \
   }

 #else //  ndef DTRACE_ENABLED


Thanks,
Yuji
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic