Extra Zero/Shark patches for review
Greg Lewis
glewis at eyesbeyond.com
Mon Nov 16 22:32:56 PST 2009
G'day Kurt,
On Mon, Nov 16, 2009 at 08:21:47PM -0500, Kurt Miller wrote:
> Greg Lewis wrote:
> > G'day all,
> >
> > I just committed a few patches for Zero support on BSD which should be
> > fairly safe. I've got a couple more that I'd like to get some review
> > on before committing. So far I've tested them on FreeBSD 7.x/i386 (single
> > processor machine) and I'm able to run a few simple Java programmes with
> > the resulting JDK:
> >
> >> ./build/bsd-i586/bin/java -version
> > openjdk version "1.7.0-internal"
> > OpenJDK Runtime Environment (build 1.7.0-internal-glewis_2009_11_15_11_42-b00)
> > OpenJDK Zero VM (build 17.0-b05, interpreted mode)
> >
> > These are the extra settings I'm using to build Zero:
> >
> > ZERO_BUILD=true
> > ZERO_ENDIANNESS=little
> > ZERO_LIBARCH=i386
> > ZERO_ARCHDEF=IA32
> >
> > It doesn't really seem like I should have to set the latter three, but they
> > don't seem to get set otherwise for the HotSpot build. It really seems
> > like the build should run something like jdk/make/jdk_generic_profile.sh
> > which seems to set up things for Zero.
> >
> > Anyway, in terms of the patches, I'd like some opinions on whether the
> > atomic changes are portable across the different BSDs (and whether they
> > do the right thing :). Note that the changes to os_bsd_zero.cpp are fairly
> > minimal. I suspect a careful review of the file may identify more changes
> > that should be made.
> >
> > I'll include the patches inline and also attach them since I'm not sure on
> > the mailing list policy regarding attachments.
>
> I was hoping to provide feedback on these, but I currently can't build
> the tree. The corba build fails with:
>
> /bin/sh: Check_ALT_JDK_IMPORT_PATH/bin/javac: not found
>
> In the past setting ALT_BOOTDIR=/usr/local/jdk-1.6.0 was good enough
> to build the tree from scratch. Have things changed an now we need to
> keep an old 1.7 build around to point ALT_JDK_IMPORT_PATH at?
>
> I'll keep looking into what's going with my build...
I think that you've divined it was needing to set JAVA_TOOLS_DIR (I'm
hoping that is temporary -- maybe we can even remove it already?).
The bad news is that the patches don't quite work on amd64. Its easy
enough to fix up the atomic ones for that, but I'm getting a little
bogged down in
hotspot/src/os_cpu/bsd_zero/vm/orderAccess_bsd_zero.inline.hpp
It seems like the i386 doesn't use this, but on amd64 it wants to use
the GCC builtin __sync_synchronize() as a full memory barrier.
Unfortunately this isn't being resolved with the FreeBSD native version
of gcc (maybe it was added later?) so that is blocking me. I don't want
to have to define ASM versions of this since, to me at least, that
partly defeats the purpose of Zero. Yes, I am aware that there are
ASM versions for arm and powerpc already defined in the file...
Anyway, I'm looking for alternatives before I breakdown and write
any assembler. Any suggestions gratefully accepted.
--
Greg Lewis Email : glewis at eyesbeyond.com
Eyes Beyond Web : http://www.eyesbeyond.com
Information Technology FreeBSD : glewis at FreeBSD.org
More information about the bsd-port-dev
mailing list