updated ARM assembler patch
Xerxes Rånby
xerxes at zafena.se
Thu Aug 26 01:46:23 PDT 2010
On 2010-08-26 04:20, Rob Savoye wrote:
> I've got a new version of the ARM assembler patch at:
> http://www.senecass.com/projects/OpenJDK-ARM/thumb2-082510.patch
> I've been battling with register allocations, as it turns out minor
> changes cause segfaults. Even running gdb causes problems depending
> where I set breakpoints.
>
> While this version has a segfault at the end, it's working better then
> the previous patch as far as I can tell. I'm not 100% sure what the
> output of the gamma test should look like, but hope all these hex
> numbers are what it's supposed to do. :-)
>
These "hex" numbers are actually referring to positions on a 8x8 chess
table.
The Queens program are designed to find all 92 possible solutions to the
Eight queens chess puzzle.
http://en.wikipedia.org/wiki/Eight_queens_puzzle
your output below have actually solved 52 of the 92 possible solutions
before it bailed out.
I have investigated this a bit closer to try triage what went wrong and
I have found out that the java.lang.ArrayIndexOutOfBoundsException
below are caused by a some kind of mis-compilation when the thumb2 JIT
kicks in.
I Tested to do a build with the assembler interpreter enabled
-DHOTSPOT_ASM and the thumb2 jit disabled -DDISABLE_THUMB2 to check if
the ASM interpreter worked and yes it works and finds all 92 possible
solutions to this Queens puzzle! I have also verified that by using your
patch the Icedtea6 pr323 are fixed when using the ARM ASM interpreter!
Verry cool!
> java full version "1.6.0_18-b18"
> java version "1.6.0_18"
> OpenJDK Runtime Environment (IcedTea6 1.8) (6b18-1.8-2ubuntu2)
> OpenJDK Zero VM (build 16.0-b13, mixed mode)
>
> 1. A1 B5 C8 D6 E3 F7 G2 H4
> 2. A1 B6 C8 D3 E7 F4 G2 H5
... snip
> 55. A5 B3 C1 D7 E2 F8 G6 H4
> 56. A5 B3 C8 D4 E7 F1 G6 H2
> Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException:
> at Queens.try_i(Queens.java:33)
> at Queens.try_i(Queens.java:41)
> at Queens.try_i(Queens.java:41)
> at Queens.try_i(Queens.java:41)
> at Queens.try_i(Queens.java:41)
> at Queens.try_i(Queens.java:41)
> at Queens.try_i(Queens.java:41)
> at Queens.main(Queens.java:65)
> make[4]: *** [productzero] Error 1
> make[4]: Leaving directory
> `/wd/rsavoye/build/openjdk/build/linux-arm/hotspot/outputdir'
> make[3]: *** [generic_buildzero] Error 2
> make[3]: Leaving directory `/wd/rsavoye/build/openjdk/hotspot/make'
> make[2]: *** [productzero] Error 2
> make[2]: Leaving directory `/wd/rsavoye/build/openjdk/hotspot/make'
> make[1]: *** [hotspot-build] Error 2
> make[1]: Leaving directory `/wd/rsavoye/build/openjdk'
> make: *** [stamps/icedtea.stamp] Error 2
>
> I've been having some weird reproducibility issues with this revision
> and with an older one where gamma doesn't always want to start.
> Sometimes it does, and sometimes it doesn't with this error:
>
> Exception in thread "main" java.lang.NoClassDefFoundError: Queens
> Caused by: java.lang.ClassNotFoundException: Queens
> at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
>
1. are you located in the
openjdk/build/linux-arm/hotspot/outputdir/linux_arm_zero/product/ dir
when running test_gamma?
2. are you using the test_gamma script to launch gamma ?
When i test gamma manually i simply do this:
cd openjdk/build/linux-arm/hotspot/outputdir/linux_arm_zero/product/
./test_gamma
and it works for me all the time.
> If I do a make, it runs once, then I get this till I make again. This
> makes it extremely difficult to debug. It's been pretty stable until
> today, I'm not sure what changed, as I don't think it has anything to do
> with my patch.
>
> - rob -
>
We have to take a closer look on the thumb2.cpp to check what went wrong
when using the ASM interpreter in combination with the thumb2 JIT.
The patched ASM interpreter now work nicely when used standalone!
Cheers
Xerxes
More information about the zero-dev
mailing list