From owner-freebsd-java@freebsd.org Sat Feb 13 21:06:56 2016 Return-Path: Delivered-To: freebsd-java@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 12549AA60A2 for ; Sat, 13 Feb 2016 21:06:56 +0000 (UTC) (envelope-from hamiltcl@verizon.net) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id F0B7E1C51 for ; Sat, 13 Feb 2016 21:06:55 +0000 (UTC) (envelope-from hamiltcl@verizon.net) Received: by mailman.ysv.freebsd.org (Postfix) id ED3E5AA60A1; Sat, 13 Feb 2016 21:06:55 +0000 (UTC) Delivered-To: java@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D44DEAA60A0 for ; Sat, 13 Feb 2016 21:06:55 +0000 (UTC) (envelope-from hamiltcl@verizon.net) Received: from vms173007pub.verizon.net (vms173007pub.verizon.net [206.46.173.7]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B304F1C50 for ; Sat, 13 Feb 2016 21:06:54 +0000 (UTC) (envelope-from hamiltcl@verizon.net) Received: from vz-proxy-l002.mx.aol.com ([64.236.82.154]) by vms173007.mailsrvcs.net (Oracle Communications Messaging Server 7.0.5.32.0 64bit (built Jul 16 2014)) with ESMTPA id <0O2I003O356UTN00@vms173007.mailsrvcs.net> for java@freebsd.org; Sat, 13 Feb 2016 14:06:31 -0600 (CST) X-CMAE-Score: 0 X-CMAE-Analysis: v=2.1 cv=WpDWSorv c=1 sm=1 tr=0 a=Ut/DdBcw22SB5hFy08yqCQ==:117 a=IkcTkHD0fZMA:10 a=jFJIQSaiL_oA:10 a=6I5d2MoRAAAA:8 a=o1OHuDzbAAAA:8 a=COfzQ7OkAAAA:8 a=UnnwD1GPAAAA:8 a=pGLkceISAAAA:8 a=_XVtnMeiVL9w8AWORSMA:9 a=c28UThVA-4dR3DFQ:21 a=QoVe30WrIxaDH1sF:21 a=QEXdDO2ut3YA:10 Received: by 96.255.168.17 with SMTP id 3fc8619b; Sat, 13 Feb 2016 20:06:31 GMT From: "Curtis Hamilton" To: "'Joe Nosay'" Cc: , References: <012601d16597$1a53c660$4efb5320$@verizon.net> In-reply-to: Subject: RE: FreeBSD PowerPC Port Date: Sat, 13 Feb 2016 15:06:15 -0500 Message-id: <019901d16699$fff8a610$ffe9f230$@verizon.net> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-transfer-encoding: quoted-printable X-Mailer: Microsoft Outlook 15.0 Thread-index: AQIg/xF0Ng5RvJUB80OM+nuhKzAxVgGG+18ann73dXA= Content-language: en-us X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Feb 2016 21:06:56 -0000 Thanks for the response, but I think you missed the point of my email. = As I stated in my email, I've already built a Zero VM, interpreter based = JDK. That's what you get with the instructions you provided. My goal was building a true native PowerPC (JIT) JDK, which until about = 12 hours ago was only available for AIX and Linux. =20 Using the Zero VM JDK and modifying the Linux PPC code, I've = successfully built a true native PowerPC (JIT) JDK. Which is an order = of magnitude faster than the interpreted JDK. BTW, I did the research and communicated with Greg, as well as others = across the OpenJDK community. Regards! -----Original Message----- From: owner-freebsd-java@freebsd.org = [mailto:owner-freebsd-java@freebsd.org] On Behalf Of Joe Nosay Sent: Saturday, February 13, 2016 2:09 PM To: Curtis Hamilton ; = bsd-port-dev@openjdk.java.net; java@freebsd.org Subject: Re: FreeBSD PowerPC Port The way I had stated this to be done as was based upon Greg Lewis's = advice to me is as such: 1. Boot strap using FreeBSD AMD64/i386 with NFS version 4 to either PowerPC^4 or PowerPC 32. 2. Recreate all of the binaries and libraries needed to build the AMD64/i386 port. 3. Rewrite the Makefiles to build directly on the PowerPC machines using = the now created files. 4. Once you have done this, then you will have a natively built port on = the FreeBSD PowerPC32/64 machine. 5. I had posted this advice on the FreeBSD forums and the mailing lists = a while back. 6. Instructions to doing this have also been described on the forums for = other architectures. 7. Do more research next time to see if any effort has been made. On Fri, Feb 12, 2016 at 8:11 AM, Curtis Hamilton wrote: > I'm working on a native PowerPC port of JDK8. I've been successful = in > building a Zero JVM. > > I originally posted information on this effort to the AIX-PPC list,=20 > however, it was recommended to post to the BSD list(s) as well. See=20 > the attached for background. > > To date, using the Linux PPC code set, I've been able to build a=20 > partially working native PPC64 JVM. I developed initial patches that=20 > can be used to build using the latest FreeBSD port. > > I can make this work available to anyone interested in helping in this = > effort. > > Regards, > Curtis > > > ---------- Forwarded message ---------- > From: > To: > Cc: > Date: Fri, 12 Feb 2016 03:28:14 -0500 > Subject: ppc-aix-port-dev Digest, Vol 44, Issue 3 Send=20 > ppc-aix-port-dev mailing list submissions to > ppc-aix-port-dev@openjdk.java.net > > To subscribe or unsubscribe via the World Wide Web, visit > http://mail.openjdk.java.net/mailman/listinfo/ppc-aix-port-dev > or, via email, send a message with subject or body 'help' to > ppc-aix-port-dev-request@openjdk.java.net > > You can reach the person managing the list at > ppc-aix-port-dev-owner@openjdk.java.net > > When replying, please edit your Subject line so it is more specific=20 > than "Re: Contents of ppc-aix-port-dev digest..." > > > ---------- Forwarded message ---------- > From: "Lindenmaier, Goetz" > To: "Thomas St=C3=BCfe" , Curtis Hamilton <=20 > hamiltcl@verizon.net> > Cc: ,=20 > > Date: Fri, 12 Feb 2016 03:27:45 -0500 > 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 > > 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=20 > > > 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=20 > > bsd and can successfully build a native (ppc64) JVM. Here=E2=80=99s = the=20 > > output I 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=20 > > 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=20 > > tell > 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" = > > in os_.cpp, and then it goes on to, in your case, > 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=20 > > bsd > does not > > install a signal handler for SIGTRAP. See > os::Bsd::install_signal_handlers(), > > and compare it with the Linux version. > > > > 2) Then, SIGTRAP must be handled in JVM_handler_bsd_signal().=20 > > Compare with the SIGTRAP handling for Linux (os_linux_ppc.cpp). But=20 > > if you copied that code, maybe SIGTRAP handling is already in place=20 > > and (1) was all > that > > was missing. > > > > Also note: The jvm normally writes a error log on crashes which is=20 > > very > useful > > ("hs_err_") but in your case it was not written at all, because = > > no > signal > > handler was installed for SIGTRAP. So, if you took care of (1) but=20 > > (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=20 > > 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 > 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 > > ] > > Sent: Monday, January 11, 2016 3:29 PM > > To: 'Thomas St=C3=BCfe' > > > > Cc: 'Volker Simonis' > >;=20 > > 'ppc-aix-port-dev@openjdk.java.net > > ' > 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=20 > > (I > have an > > old PowerStation 220 in my collection). However, the ppc-aix-port=20 > > was > the > > first that contained code specific to the ppc. 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=20 > > had > 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 > > ] > > Sent: Monday, January 11, 2016 11:23 AM > > To: Curtis Hamilton > > > > Cc: Volker Simonis > >;=20 > > ppc-aix-port-dev@openjdk.java.net=20 > > > > > > > > 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 also=20 > > 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 > > > wrote: > > > > Volker, > > > > > > > > Thanks for the response. > > > > > > > > Yes, I=E2=80=99m using the mercurial jdk7u ppc-aix = version. =20 > > The reason I used this port version was because I was more familiar=20 > > with the > build > > layout of jdk7 versus jdk8/jdk9. And it seemed like an easier=20 > > target to > start > > with, since it already supported ppc64 on AIX and Linux. > > > > > > > > Full disclosure, I=E2=80=99ve been successful in = building zero=20 > > 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=20 > > if I > could > > build native ppc64 versions leveraging the existing AIX and Linux=20 > > ppc64 support in the ppc-aix-port, since the bsd-port lacks support=20 > > 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 version is not > completely > > wasted. > > > > > > > > I look forward to contributing to the ppc64/bsd port > OpenJDK > > integration effort. > > > > > > > > Regards, > > > > Curtis > > > > > > > > From: Volker Simonis [mailto:volker.simonis@gmail.com=20 > > ] > > Sent: Monday, January 11, 2016 5:22 AM > > To: Curtis Hamilton > > > > Cc: ppc-aix-port-dev@openjdk.java.net 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 > quite old > > and we don't actually support it any more. It was also never=20 > > integrated > into > > the main jdk7u branch. I'd strongly recommend to use at least the=20 > > jdk8u version. If you plan to contribute the ppc64/bsd port for=20 > > 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 = > > to > jdk7u > > because that on doesn't even contain the ppc64 port). > > > > That said, which version of jdk7u are you using? Is it = > > the > one > > from http://hg.openjdk.java.net/ppc-aix-port/jdk7u/ ? > > > > One problem you may encounter with jdk7u is that it=20 > > was never compiled with new versions of gcc. I see you are using=20 > > gcc4.8 but > we > > used 4.1.2 back then when we were doing the port. > > > > Another problem is that we didn't support the > 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 vmStructs.cpp is most probably=20 > > from > SA > > coding. How does your file vmStructs_bsd_ppc.hpp looks like. As you=20 > > can see, vmStructs_linux_ppc.hpp is empty in jdk7u for the ppc64=20 > > port while > it > > has some code in jdk8u-dev and jdk9. > > > > Unfortunately the place in vmStructs.cpp where the=20 > > error happens is deeply nested macro coding so it's hard to say=20 > > what's wrong > from > > the error message. You could preprocess the file and post that to=20 > > 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 > > > 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 = > > 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 > > > > > > > > > > > > > > > > > > ---------- Forwarded message ---------- > From: Volker Simonis > To: "Thomas St=C3=BCfe" > Cc: Curtis Hamilton , <=20 > ppc-aix-port-dev@openjdk.java.net>, > Date: Fri, 12 Feb 2016 03:28:10 -0500 > Subject: Re: PPC-AIX Port to FreeBSD PowerPC Support Hi Curtis, > > congratulations from my side as well. Running HelloWorld is always an=20 > important milestone when porting the OpenJDK to a new platform! > > I think Thomas already gave you the right hints. It's true that=20 > SIGTRAP is used a lot within HotSpot and you really need to handle it=20 > correctly. > > As a quick workaround you could also try to use -XX:-UseSIGTRAP which=20 > should switch off the usage of SIGTRAP within the VM. You also have to = > use this switch when debugging the VM in a native debugger like gdb=20 > because the debugger also uses SIGTRAP internally. > > Regards, > Volker > > > On Fri, Feb 12, 2016 at 8:08 AM, Thomas St=C3=BCfe=20 > > wrote: > > 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=20 > > > > wrote: > >> > >> Thomas/Volker, > >> > >> > >> > >> Just wanted to give you an update on my bsd/ppc64 porting effort. =20 > >> I=E2=80=99m using the standard bsd openjdk8 port, as the bsd = mercurial=20 > >> needs 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=20 > >> I get > executing > >> =E2=80=98java =E2=80=93version=E2=80=99 > >> > >> > >> > >> > >> root@lenoil8 > :/usr/ports/java/openjdk8/work/openjdk/build/bsd-ppc64-normal-server-s > lowdebug/jdk/bin > >> # ./java -version > >> openjdk version "1.8.0_72-debug" > >> OpenJDK Runtime Environment (build 1.8.0_72-debug-b15) OpenJDK=20 > >> 64-Bit Server VM (build 25.72-b15-debug, mixed mode) > >> > >> root@lenoil8 > :/usr/ports/java/openjdk8/work/openjdk/build/bsd-ppc64-normal-server-s > lowdebug/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-s > lowdebug/jdk/bin > >> # ./javac HelloWorld.java > >> > >> root@lenoil8 > :/usr/ports/java/openjdk8/work/openjdk/build/bsd-ppc64-normal-server-s > lowdebug/jdk/bin > >> # ./java HelloWorld > >> Hello, World > >> > >> root@lenoil8 > :/usr/ports/java/openjdk8/work/openjdk/build/bsd-ppc64-normal-server-s > lowdebug/jdk/bin > >> # ./javac zip.java > >> Trace/BPT trap (core dumped) > >> > >> root@lenoil8 > :/usr/ports/java/openjdk8/work/openjdk/build/bsd-ppc64-normal-server-s > lowdebug/jdk/bin > >> # ./javac LargeZip.java > >> Trace/BPT trap (core dumped) > >> > >> root@lenoil8 > :/usr/ports/java/openjdk8/work/openjdk/build/bsd-ppc64-normal-server-s > lowdebug/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" = > > in os_.cpp, and then it goes on to, in your case, > 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=20 > > 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().=20 > > Compare > with > > the SIGTRAP handling for Linux (os_linux_ppc.cpp). But if you copied = > > that code, maybe SIGTRAP handling is already in place and (1) was=20 > > all that was missing. > > > > Also note: The jvm normally writes a error log on crashes which is=20 > > very useful ("hs_err_") but in your case it was not written at=20 > > all, > because > > no signal handler was installed for SIGTRAP. So, if you took care of = > > (1) > but > > (2) is still missing, you may still crash but with a real error=20 > > report > log > > this time. > > > > Side note: Magnus Ihse Bursie is cleaning up and repairing the BSD=20 > > port, > > see: > > > http://mail.openjdk.java.net/pipermail/bsd-port-dev/2016-January/00273 > 9.html > > > > His changes are not yet committed, but he posted a webrev with his > changes > > ( > http://cr.openjdk.java.net/~ihse/JDK-8147795_addendum-bsd-source-patch > es/webrev.01/ > ). > > It may make sense to integrate this in your build, he did some=20 > > 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] > >> Sent: Monday, January 11, 2016 3:29 PM > >> To: 'Thomas St=C3=BCfe' > >> Cc: 'Volker Simonis' ;=20 > >> 'ppc-aix-port-dev@openjdk.java.net'=20 > >> > >> 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. 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 the ppc code and go from there. > >> > >> > >> > >> Now that ppc code is being integrated into a more universal 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] > >> Sent: Monday, January 11, 2016 11:23 AM > >> To: Curtis Hamilton > >> Cc: Volker Simonis ;=20 > >> 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=20 > >> port. AIX os port contains a large number of AIX specifics and it=20 > >> is quite a bit different (sometimes, needlessly) from the other=20 > >> Unices. It is also a > moving > >> target, at least on jdk9, as we changed a lot in the AIX os port=20 > >> and > will > >> change more until the next feature close. > >> > >> > >> > >> So, it may be that linux ppc would be a better porting source for a = > >> bsd ppc port. > >> > >> > >> > >> Kind Regards, Thomas > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> On Mon, Jan 11, 2016 at 3:21 PM, Curtis Hamilton=20 > >> > >> wrote: > >> > >> Volker, > >> > >> > >> > >> Thanks for the response. > >> > >> > >> > >> Yes, I=E2=80=99m using the mercurial jdk7u ppc-aix version. The = reason I=20 > >> used this port version was because I was more familiar with the=20 > >> build layout > of > >> jdk7 versus jdk8/jdk9. And it seemed like an easier target to=20 > >> 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 I could=20 > >> build native ppc64 versions leveraging the existing AIX and Linux=20 > >> 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 your = advice, I=20 > >> will start working with ppc-aix jdk8u. I don=E2=80=99t want anyone = to=20 > >> waste time > with > >> jdk7u. Although my efforts with this older version is not=20 > >> completely > wasted. > >> > >> > >> > >> I look forward to contributing to the ppc64/bsd port OpenJDK=20 > >> integration effort. > >> > >> > >> > >> Regards, > >> > >> Curtis > >> > >> > >> > >> From: Volker Simonis [mailto:volker.simonis@gmail.com] > >> Sent: Monday, January 11, 2016 5:22 AM > >> To: Curtis Hamilton > >> Cc: 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 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 at least the jdk8u > version. > >> If you plan to contribute the ppc64/bsd port for integration into=20 > >> the OpenJDK, this has to be done into the head revision (currently=20 > >> jdk9) > anyway. > >> Once it's there, it may be possible to downport it to jdk8u (but=20 > >> not to jdk7u because that on doesn't even contain the ppc64 port). > >> > >> That said, which version of jdk7u are you using? Is it the one from = > >> http://hg.openjdk.java.net/ppc-aix-port/jdk7u/ ? > >> > >> One problem you may encounter with jdk7u is that it was never=20 > >> compiled with new versions of gcc. I see you are using gcc4.8 but=20 > >> we used 4.1.2 > back > >> then when we were doing the port. > >> > >> Another problem is that we didn't support the serviceability agent=20 > >> in jdk7u. Support for the SA agent on Linux/ppc64 (but not for AIX) = > >> was > added > >> in jdk8. The error you see in vmStructs.cpp is most probably from=20 > >> SA > coding. > >> How does your file vmStructs_bsd_ppc.hpp looks like. As you can=20 > >> see, vmStructs_linux_ppc.hpp is empty in jdk7u for the ppc64 port=20 > >> 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=20 > >> 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 -DPRODUCT=20 > >> -I/usr/ports/tmp/jdk7u/hotspot/src/share/vm/prims > >> -I/usr/ports/tmp/jdk7u/hotspot/src/share/vm > >> -I/usr/ports/tmp/jdk7u/hotspot/src/share/vm/precompiled > >> -I/usr/ports/tmp/jdk7u/hotspot/src/cpu/ppc/vm > >> -I/usr/ports/tmp/jdk7u/hotspot/src/os_cpu/bsd_ppc/vm > >> -I/usr/ports/tmp/jdk7u/hotspot/src/os/bsd/vm > >> -I/usr/ports/tmp/jdk7u/hotspot/src/os/posix/vm -I../generated=20 > >> -DHOTSPOT_RELEASE_VERSION=3D"\"24.80-b11\"" > >> -DHOTSPOT_BUILD_TARGET=3D"\"product\"" = -DHOTSPOT_BUILD_USER=3D"\"root\"" > >> -DHOTSPOT_LIB_ARCH=3D\"ppc\" -DHOTSPOT_VM_DISTRO=3D"\"OpenJDK\"" > >> -DDEFAULT_LIBPATH=3D"\"/lib:/usr/lib:/usr/local/lib\"" > -DTARGET_OS_FAMILY_bsd > >> -DTARGET_ARCH_ppc -DTARGET_ARCH_MODEL_ppc_64=20 > >> -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=20 > >> -DDONT_USE_PRECOMPILED_HEADER -O3 -fno-strict-aliasing -D_LP64=3D1=20 > >> -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 > >> > >> wrote: > >> > >> Hello, > >> > >> I=E2=80=99d like to know if there=E2=80=99s been any work done to = support PPC for *BSD? > >> > >> I=E2=80=99ve hacked both the AIX and Linux PPC headers but have = been > unsuccessful > >> in building HotSpot. All modules seem to build with the exception=20 > >> of VMStructs.cpp with the below error. > >> > >> /usr/ports/tmp/jdk7u/hotspot/src/share/vm/runtime/vmStructs.cpp: In > static > >> member function 'static void VMStructs::init()': > >> = /usr/ports/tmp/jdk7u/hotspot/src/share/vm/runtime/vmStructs.cpp:3015: > >> error: cannot convert 'pthread**' to 'pid_t*' in initialization > >> > >> Build log is attached. > >> > >> Thanks in advance! > >> > >> > >> > >> Curtis > >> > >> > >> > >> > >> > >> > > > > > > > _______________________________________________ > freebsd-java@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-java > To unsubscribe, send any mail to = "freebsd-java-unsubscribe@freebsd.org" > _______________________________________________ freebsd-java@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-java To unsubscribe, send any mail to "freebsd-java-unsubscribe@freebsd.org"