Date: Sat, 13 Feb 2016 11:49:27 -0500 From: "Curtis Hamilton" <hamiltcl@verizon.net> To: "'Lindenmaier, Goetz'" <goetz.lindenmaier@sap.com>, =?utf-8?Q?'Thomas_St=C3=BCfe'?= <thomas.stuefe@gmail.com> Cc: <ppc-aix-port-dev@openjdk.java.net>, <bsd-port-dev@openjdk.java.net>, <freebsd-java@freebsd.org> Subject: RE: PPC-AIX Port to FreeBSD PowerPC Support Message-ID: <017a01d1667e$82d20750$887615f0$@verizon.net> In-Reply-To: <87a664accf3f4760b00d2d8411e9aedf@DEWDFE13DE09.global.corp.sap> References: <011601d14baf$e0305940$a0910bc0$@verizon.net> <CA%2B3eh11UBaufhiZn4nicb0On91i38kFqyjP5CAC9AJUn=92Gbw@mail.gmail.com> <001201d14c7b$4f210ef0$ed632cd0$@verizon.net> <CAA-vtUynZyN5%2BBbkssFQCyKFy0QJARgHigd65cyJs9w25Q6htQ@mail.gmail.com> <00f201d1655e$465323c0$d2f96b40$@verizon.net> <CAA-vtUxxYCzD7E4apU-c81xgP6qR7t7m35T9=TWx=voe2JdCfQ@mail.gmail.com> <87a664accf3f4760b00d2d8411e9aedf@DEWDFE13DE09.global.corp.sap>
next in thread | previous in thread | raw e-mail | index | archive | help
This is a multipart message in MIME format. ------=_NextPart_000_017B_01D16654.99FD10C0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Thomas/Volker, et al Thanks to your assistance, I've been SUCCESSFUL in building a native = ppc64 jdk8 on FreeBSD. To validate the build, I made a couple of regression test runs with = results similar to the Zero VM build in the same environment. Although, = not all tests completed successfully (some of the failed test were due = to missing test files in the distribution). The regression test stats = file is attached.=20 I've created a set of initial patches for the code and several patches = for the build system. However, there's one build system issue that I've = not yet resolved. At the end of the Hotspot build, it errors because it = cannot find jvmti.hmtl, jvmti.h, libjsig.so and libjvm.so. The files = exist, but the "HOTSPOT_DIST" directory structure has not been created, = with these files in the locations the build system expects. I'm sure = that this is because of building a Compiler2 variant on a non-supported = platform, as I don't have this issue with the Zero VM build. Thus, I = manually created the "dist" structure and placed the files in the = expected locations and the remainder of the build works as designed. = Any thoughts? I'm going to continue to stress test the build, to ensure everything is = in working order. Again, thanks for all the assistance. Regards, Curtis -----Original Message----- From: Lindenmaier, Goetz [mailto:goetz.lindenmaier@sap.com]=20 Sent: Friday, February 12, 2016 3:28 AM To: Thomas St=C3=BCfe <thomas.stuefe@gmail.com>; Curtis Hamilton = <hamiltcl@verizon.net> Cc: ppc-aix-port-dev@openjdk.java.net; bsd-port-dev@openjdk.java.net Subject: RE: PPC-AIX Port to FreeBSD PowerPC Support Hi Curtis, If SIGTRAP ist he problem, you could try -XX:-UseSIGTRAP. This slows down null checks a bit, but this should not matter for now. Best regards, Goetz > -----Original Message----- > From: ppc-aix-port-dev [mailto:ppc-aix-port-dev-=20 > bounces@openjdk.java.net] On Behalf Of Thomas St=C3=BCfe > Sent: Freitag, 12. Februar 2016 08:08 > To: Curtis Hamilton <hamiltcl@verizon.net> > Cc: ppc-aix-port-dev@openjdk.java.net; bsd-port-dev@openjdk.java.net > Subject: Re: PPC-AIX Port to FreeBSD PowerPC Support > > Hi Curtis, > > I think it makes sense to post this on the bsd list too. > > See my comments inline. > > On Fri, Feb 12, 2016 at 7:26 AM, Curtis Hamilton <hamiltcl@verizon.net = > <mailto:hamiltcl@verizon.net> > wrote: > > > Thomas/Volker, > > > > Just wanted to give you an update on my bsd/ppc64 porting = effort. > I=E2=80=99m using the standard bsd openjdk8 port, as the bsd mercurial = needs=20 > freebsd specific patches. > > > > I=E2=80=99ve made progress modding the linux/ppc files to work = under bsd=20 > and can successfully build a native (ppc64) JVM. Here=E2=80=99s the = output I=20 > get executing =E2=80=98java =E2=80=93version=E2=80=99 > > > > root@lenoil8:/usr/ports/java/openjdk8/work/openjdk/build/bsd- > ppc64-normal-server-slowdebug/jdk/bin # ./java -version > openjdk version "1.8.0_72-debug" > OpenJDK Runtime Environment (build 1.8.0_72-debug-b15) > OpenJDK 64-Bit Server VM (build 25.72-b15-debug, mixed mode) > root@lenoil8:/usr/ports/java/openjdk8/work/openjdk/build/bsd- > ppc64-normal-server-slowdebug/jdk/bin # > > > Great Job! > > > > I can compile and execute the basic =E2=80=9Chello = world=E2=80=9D. However,=20 > compiling more complicated java code results in a core dump. See the > following: > > > > root@lenoil8:/usr/ports/java/openjdk8/work/openjdk/build/bsd- > ppc64-normal-server-slowdebug/jdk/bin # ./javac HelloWorld.java > root@lenoil8:/usr/ports/java/openjdk8/work/openjdk/build/bsd- > ppc64-normal-server-slowdebug/jdk/bin # ./java HelloWorld > Hello, World > root@lenoil8:/usr/ports/java/openjdk8/work/openjdk/build/bsd- > ppc64-normal-server-slowdebug/jdk/bin # ./javac zip.java > Trace/BPT trap (core dumped) > root@lenoil8:/usr/ports/java/openjdk8/work/openjdk/build/bsd- > ppc64-normal-server-slowdebug/jdk/bin # ./javac LargeZip.java > Trace/BPT trap (core dumped) > root@lenoil8:/usr/ports/java/openjdk8/work/openjdk/build/bsd- > ppc64-normal-server-slowdebug/jdk/bin # > > As you can see this is a debug build and I=E2=80=99ve been able = to tell=20 > from the core dump, using gdb, that it=E2=80=99s getting a signal 5 at = abort. > > > > > I think SIGTRAP is used by the ppc JIT for some things (implicit = nullchecks? > Volker would know better). So, SIGTRAP must be handled for this to = work. > > The JVM has a central signal handler, entry point is "signalHandler"=20 > in os_<os>.cpp, and then it goes on to, in your case,=20 > JVM_handler_bsd_signal() in os_bsd_ppc.cpp. > > So, make sure that > > 1) SIGTRAP is handled by this signal handler - I think, by default bsd = > does not install a signal handler for SIGTRAP. See=20 > os::Bsd::install_signal_handlers(), > and compare it with the Linux version. > > 2) Then, SIGTRAP must be handled in JVM_handler_bsd_signal(). Compare=20 > with the SIGTRAP handling for Linux (os_linux_ppc.cpp). But if you=20 > copied that code, maybe SIGTRAP handling is already in place and (1)=20 > was all that was missing. > > Also note: The jvm normally writes a error log on crashes which is=20 > very useful > ("hs_err_<pid>") but in your case it was not written at all, because=20 > no signal handler was installed for SIGTRAP. So, if you took care of=20 > (1) but (2) is still missing, you may still crash but with a real = error report log this time. > > Side note: Magnus Ihse Bursie is cleaning up and repairing the BSD = port, see: > http://mail.openjdk.java.net/pipermail/bsd-port-dev/2016- > January/002739.html > > His changes are not yet committed, but he posted a webrev with his=20 > changes > (http://cr.openjdk.java.net/~ihse/JDK-8147795_addendum-bsd-source- > patches/webrev.01/). It may make sense to integrate this in your=20 > build, he did some worthwhile fixes. > > Kind Regards, Thomas > > > > > Any recommendations on what to look at or how to further debug? > > > > Regards, > > > > Curtis > > > > From: Curtis Hamilton [mailto:hamiltcl@verizon.net=20 > <mailto:hamiltcl@verizon.net> ] > Sent: Monday, January 11, 2016 3:29 PM > To: 'Thomas St=C3=BCfe' <thomas.stuefe@gmail.com=20 > <mailto:thomas.stuefe@gmail.com> > > Cc: 'Volker Simonis' <volker.simonis@gmail.com=20 > <mailto:volker.simonis@gmail.com> >;=20 > 'ppc-aix-port-dev@openjdk.java.net > <mailto:ppc-aix-port-dev@openjdk.java.net> ' <ppc-aix-port-=20 > dev@openjdk.java.net <mailto:ppc-aix-port-dev@openjdk.java.net> > > Subject: RE: PPC-AIX Port to FreeBSD PowerPC Support > > > > Thomas, > > > > Thanks for the vector check! > > > > I agree that the AIX os is quite different from other unices (I=20 > have an old PowerStation 220 in my collection). However, the=20 > ppc-aix-port was the first that contained code specific to the ppc. =20 > Since there isn=E2=80=99t a ppc-bsd port, I needed somewhere to start. = PPC code for both AIX and Linux can be found > in the same port. The ports available on FreeBSD currently do = contain any of > the ppc headers or code. So I decided to use a port that already had=20 > the ppc code and go from there. > > > > Now that ppc code is being integrated into a more universal=20 > port, I just need to check which jdk8 port to work with. > > > > Any recommendation? > > > > Regards, > > Curtis > > > > From: Thomas St=C3=BCfe [mailto:thomas.stuefe@gmail.com=20 > <mailto:thomas.stuefe@gmail.com> ] > Sent: Monday, January 11, 2016 11:23 AM > To: Curtis Hamilton <hamiltcl@verizon.net=20 > <mailto:hamiltcl@verizon.net> > > Cc: Volker Simonis <volker.simonis@gmail.com=20 > <mailto:volker.simonis@gmail.com> >; ppc-aix-port-dev@openjdk.java.net = > <mailto:ppc-aix-port-dev@openjdk.java.net> > > > Subject: Re: PPC-AIX Port to FreeBSD PowerPC Support > > > > > > Hi Curtis, > > > > I am not sure that AIX ppc would be the best source for an BSD = port. > AIX os port contains a large number of AIX specifics and it is quite a = > bit different (sometimes, needlessly) from the other Unices. It is=20 > also a moving target, at least on jdk9, as we changed a lot in the AIX = > os port and will change more until the next feature close. > > > > So, it may be that linux ppc would be a better porting source=20 > for a bsd ppc port. > > > > Kind Regards, Thomas > > > > > > > > > > > > On Mon, Jan 11, 2016 at 3:21 PM, Curtis Hamilton=20 > <hamiltcl@verizon.net <mailto:hamiltcl@verizon.net> > wrote: > > Volker, > > > > Thanks for the response. > > > > Yes, I=E2=80=99m using the mercurial jdk7u ppc-aix = version. The=20 > reason I used this port version was because I was more familiar with=20 > the build layout of jdk7 versus jdk8/jdk9. And it seemed like an=20 > easier target to start with, since it already supported ppc64 on AIX = and Linux. > > > > Full disclosure, I=E2=80=99ve been successful in = building zero vm for > both jdk7 and jdk8 on ppc64/FreeBSD. They both work great. The = system > performance is somewhat sluggish, but usable. So I decided to see if=20 > I could build native ppc64 versions leveraging the existing AIX and=20 > Linux ppc64 support in the ppc-aix-port, since the bsd-port lacks = support for PowerPC. > > > > I=E2=80=99m aware of the integration effort for jdk9. = So on=20 > your advice, I will start working with ppc-aix jdk8u. I don=E2=80=99t = want=20 > anyone to waste time with jdk7u. Although my efforts with this older=20 > version is not completely wasted. > > > > I look forward to contributing to the ppc64/bsd port=20 > OpenJDK integration effort. > > > > Regards, > > Curtis > > > > From: Volker Simonis [mailto:volker.simonis@gmail.com=20 > <mailto:volker.simonis@gmail.com> ] > Sent: Monday, January 11, 2016 5:22 AM > To: Curtis Hamilton <hamiltcl@verizon.net=20 > <mailto:hamiltcl@verizon.net> > > Cc: ppc-aix-port-dev@openjdk.java.net=20 > <mailto:ppc-aix-port- dev@openjdk.java.net> > Subject: Re: PPC-AIX Port to FreeBSD PowerPC Support > > > > Hi Curtis, > > no, I'm not aware of any effort to port the ppc64 port = to BSD. > > My first question is why are you building jdk7. It is=20 > quite old and we don't actually support it any more. It was also never = > integrated into the main jdk7u branch. I'd strongly recommend to use=20 > at least the jdk8u version. If you plan to contribute the ppc64/bsd=20 > port for integration into the OpenJDK, this has to be done into the = head revision (currently jdk9) anyway. > Once it's there, it may be possible to downport it to jdk8u (but not=20 > to jdk7u because that on doesn't even contain the ppc64 port). > > That said, which version of jdk7u are you using? Is it=20 > the one from http://hg.openjdk.java.net/ppc-aix-port/jdk7u/ ? > > One problem you may encounter with jdk7u is that it was=20 > never compiled with new versions of gcc. I see you are using gcc4.8=20 > but we used 4.1.2 back then when we were doing the port. > > Another problem is that we didn't support the=20 > serviceability agent in jdk7u. Support for the SA agent on Linux/ppc64 = > (but not for AIX) was added in jdk8. The error you see in=20 > vmStructs.cpp is most probably from SA coding. How does your file=20 > vmStructs_bsd_ppc.hpp looks like. As you can see,=20 > vmStructs_linux_ppc.hpp is empty in jdk7u for the ppc64 port while it = has some code in jdk8u-dev and jdk9. > > Unfortunately the place in vmStructs.cpp where the error = > happens is deeply nested macro coding so it's hard to say what's wrong = > from the error message. You could preprocess the file and post that to = > the list, maybe we can see more. Just issue the following command from = > a shell from within /usr/ports/tmp/jdk7u/build/bsd- > ppc/hotspot/outputdir/bsd_ppc64_compiler2/product: > > g++48 -DBSD -DPPC64 -D_ALLBSD_SOURCE - D_GNU_SOURCE=20 > -DPRODUCT - I/usr/ports/tmp/jdk7u/hotspot/src/share/vm/prims -=20 > I/usr/ports/tmp/jdk7u/hotspot/src/share/vm -=20 > I/usr/ports/tmp/jdk7u/hotspot/src/share/vm/precompiled -=20 > I/usr/ports/tmp/jdk7u/hotspot/src/cpu/ppc/vm -=20 > I/usr/ports/tmp/jdk7u/hotspot/src/os_cpu/bsd_ppc/vm -=20 > I/usr/ports/tmp/jdk7u/hotspot/src/os/bsd/vm -=20 > I/usr/ports/tmp/jdk7u/hotspot/src/os/posix/vm -I../generated -=20 > DHOTSPOT_RELEASE_VERSION=3D"\"24.80-b11\"" -=20 > DHOTSPOT_BUILD_TARGET=3D"\"product\"" - = DHOTSPOT_BUILD_USER=3D"\"root\""=20 > -DHOTSPOT_LIB_ARCH=3D\"ppc\" - DHOTSPOT_VM_DISTRO=3D"\"OpenJDK\"" -=20 > DDEFAULT_LIBPATH=3D"\"/lib:/usr/lib:/usr/local/lib\"" -=20 > DTARGET_OS_FAMILY_bsd -DTARGET_ARCH_ppc - > DTARGET_ARCH_MODEL_ppc_64 -DTARGET_OS_ARCH_bsd_ppc - > DTARGET_OS_ARCH_MODEL_bsd_ppc_64 -DTARGET_COMPILER_gcc - > DCOMPILER2 -fPIC -fno-rtti -fno-exceptions -pthread -fcheck-new - > mpowerpc64 -pipe -DDONT_USE_PRECOMPILED_HEADER -O3 -fno-strict-=20 > aliasing -D_LP64=3D1 -m64 -mminimal-toc -mcpu=3Dpowerpc64 = -mtune=3Dpower5 -=20 > minsert-sched-nops=3Dregroup_exact -mno-multiple -mno-string -=20 > DSAFEFETCH_STUBS -DINCLUDE_TRACE=3D1 -Werror -Wpointer-arith - > Wconversion -Wsign-compare -E > /usr/ports/tmp/jdk7u/hotspot/src/share/vm/runtime/vmStructs.cpp > > Regards, > > Volker > > > > On Sun, Jan 10, 2016 at 3:04 PM, Curtis Hamilton=20 > <hamiltcl@verizon.net <mailto:hamiltcl@verizon.net> > wrote: > > Hello, > > I=E2=80=99d like to know if there=E2=80=99s been = any work done=20 > to support PPC for *BSD? > > I=E2=80=99ve hacked both the AIX and Linux PPC = headers=20 > but have been unsuccessful in building HotSpot. All modules seem to=20 > build with the exception of VMStructs.cpp with the below error. > > > /usr/ports/tmp/jdk7u/hotspot/src/share/vm/runtime/vmStructs.cp > p: In static member function 'static void VMStructs::init()': > > /usr/ports/tmp/jdk7u/hotspot/src/share/vm/runtime/vmStructs.cp > p:3015: error: cannot convert 'pthread**' to 'pid_t*' in=20 > initialization > > Build log is attached. > > Thanks in advance! > > > > Curtis > > > > > > > ------=_NextPart_000_017B_01D16654.99FD10C0 Content-Type: text/plain; name="Stats.txt" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="Stats.txt" Summary: jdk_core=0A= FAILED: java/io/BufferedInputStream/LargeCopyWithMark.java=0A= FAILED: = java/io/Serializable/unresolvableObjectStreamClass/UnresolvableObjectStre= amClass.java=0A= FAILED: java/lang/ProcessBuilder/DestroyTest.java=0A= FAILED: java/lang/Thread/ThreadStateTest.java=0A= FAILED: java/lang/invoke/lambda/LogGeneratedClassesTest.java=0A= FAILED: java/net/DatagramSocket/B6411513.java=0A= FAILED: java/net/Inet4Address/PingThis.java=0A= FAILED: java/net/Inet6Address/B6206527.java=0A= FAILED: java/net/InetAddress/CachedUnknownHostName.java=0A= FAILED: java/net/InetAddress/IPv4Formats.java=0A= FAILED: java/net/InetAddress/IsReachableViaLoopbackTest.java=0A= FAILED: java/net/MulticastSocket/B6427403.java=0A= FAILED: java/net/MulticastSocket/JoinGroup.java=0A= FAILED: java/net/MulticastSocket/Leave.java=0A= FAILED: java/net/MulticastSocket/MultiDead.java=0A= FAILED: java/net/MulticastSocket/Promiscuous.java=0A= FAILED: java/net/MulticastSocket/SetLoopbackMode.java=0A= FAILED: java/net/MulticastSocket/Test.java=0A= FAILED: java/net/ServerSocket/AcceptCauseFileDescriptorLeak.sh=0A= FAILED: java/net/Socket/SetSoLinger.java=0A= FAILED: java/net/Socket/TrafficClass.java=0A= FAILED: java/net/SocketPermission/Wildcard.java=0A= FAILED: java/net/Socks/SocksV4Test.java=0A= FAILED: java/net/URL/OpenStream.java=0A= FAILED: java/net/URLClassLoader/closetest/CloseTest.java=0A= FAILED: java/net/URLClassLoader/closetest/GetResourceAsStream.java=0A= FAILED: java/net/URLPermission/nstest/lookup.sh=0A= FAILED: java/net/ipv6tests/B6521014.java=0A= FAILED: java/nio/MappedByteBuffer/Truncate.java=0A= FAILED: java/nio/channels/AsyncCloseAndInterrupt.java=0A= FAILED: java/nio/channels/AsynchronousChannelGroup/Basic.java=0A= FAILED: java/nio/channels/AsynchronousChannelGroup/GroupOfOne.java=0A= FAILED: java/nio/channels/AsynchronousChannelGroup/Identity.java=0A= FAILED: java/nio/channels/AsynchronousChannelGroup/Restart.java=0A= FAILED: java/nio/channels/AsynchronousChannelGroup/Unbounded.java=0A= FAILED: java/nio/channels/AsynchronousChannelGroup/run_any_task.sh=0A= FAILED: java/nio/channels/AsynchronousSocketChannel/Basic.java=0A= FAILED: = java/nio/channels/AsynchronousSocketChannel/DieBeforeComplete.java=0A= FAILED: java/nio/channels/AsynchronousSocketChannel/Leaky.java=0A= FAILED: java/nio/channels/AsynchronousSocketChannel/StressLoopback.java=0A= FAILED: java/nio/channels/Channels/Basic2.java=0A= FAILED: java/nio/channels/DatagramChannel/MulticastSendReceiveTests.java=0A= FAILED: java/nio/channels/DatagramChannel/SendToUnresolved.java=0A= FAILED: java/nio/channels/Selector/LotsOfChannels.java=0A= FAILED: java/nio/channels/SocketChannel/ExceptionTranslation.java=0A= FAILED: java/nio/channels/SocketChannel/Shutdown.java=0A= FAILED: java/nio/file/Files/probeContentType/ParallelProbes.java=0A= FAILED: java/util/zip/ZipFile/MultiThreadedReadTest.java=0A= FAILED: java/util/zip/ZipFile/ZipEntryFreeTest.java=0A= FAILED: javax/rmi/PortableRemoteObject/ConcurrentHashMapTest.java=0A= FAILED: javax/xml/jaxp/parsers/8032909/XSLT.java=0A= FAILED: javax/xml/ws/8043129/MailTest.java=0A= FAILED: jdk/net/Sockets/SupportedOptions.java=0A= FAILED: sample/chatserver/ChatTest.java=0A= FAILED: sun/reflect/AnonymousNewInstance/ManyNewInstanceAnonTest.java=0A= FAILED: sun/security/ec/TestEC.java=0A= FAILED: = sun/security/provider/certpath/DisabledAlgorithms/CPBuilderWithMD5.java=0A= FAILED: sun/tools/native2ascii/NativeErrors.java=0A= TEST STATS: name=3Djdk_core run=3D3597 pass=3D3539 fail=3D58=0A= ------=_NextPart_000_017B_01D16654.99FD10C0--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?017a01d1667e$82d20750$887615f0$>