OpenJDK-6 ARM Shark LLVM JIT testing
Hi all!
I have committed some ARM Shark CPU features auto-detection code into oe.dev.
http://cgit.openembedded.org/cgit.cgi/openembedded/commit/?id=1ea15a2cd73178c3fbab36b544a6601b1d1c32bf
This patch will make OpenJDK use the best ARM CPU features available when generating code using the Shark JIT.
To test shark build the openjdk-6 package and run your favorite java application with the -shark switch.
java -shark foo
The Shark JIT uses LLVM for its in memory code generation and the stability of Shark depends on
how much the LLVM JIT have been tested on various ARM CPUs.
I need your help in order to find and catch the LLVM JIT bugs by testing running Shark and report if
LLVM asserts during code generation.
If LLVM asserts then you can help generate LLVM testcases by running shark with this switch:
java -shark -XX:SharkPrintBitcodeOf=insert::problematic:method::name::here foo And attach the output in the report.
I have written a small guide on how to get Shark LLVM JIT CodeGen crash bugs fixed:
http://labb.zafena.se/?p=362
Cheers and have a great day!
Xerxes
Hi,
when you install the shark-vm package. Shark will be the default vm.
Bye Henning
Dnia środa, 14 lipca 2010 o 19:37:03 Xerxes Rånby napisał(a):
Quoted 11 lines
Hi all!
I have committed some ARM Shark CPU features auto-detection code into oe.dev.
http://cgit.openembedded.org/cgit.cgi/openembedded/commit/?id=1ea15a2cd73178c3fbab36b544a6601b1d1c32bfThis patch will make OpenJDK use the best ARM CPU features available when generating code using the Shark JIT.I need your help in order to find and catch the LLVM JIT bugs by testing running Shark and report if
LLVM asserts during code generation.
LLVM does not supports Thumb - thats hurt. Ubuntu had to disable Shark to get openjdk-6 built for armel.
Regards,
Signature · 3 lines
JID: [email protected] Website: http://marcin.juszkiewicz.com.pl/ LinkedIn: http://www.linkedin.com/in/marcinjuszkiewicz
Quoted 11 lines · Marcin Juszkiewicz
Dnia środa, 14 lipca 2010 o 19:37:03 Xerxes Rånby napisał(a):
Quoted 8 lines
Hi all!
I have committed some ARM Shark CPU features auto-detection code into oe.dev.
http://cgit.openembedded.org/cgit.cgi/openembedded/commit/?id=1ea15a2cd73178c3fbab36b544a6601b1d1c32bfThis patch will make OpenJDK use the best ARM CPU features available when generating code using the Shark JIT.
Quoted 9 lines
Quoted 4 lines
I need your help in order to find and catch the LLVM JIT bugs by testing running Shark and report if
LLVM asserts during code generation.LLVM does not supports Thumb - thats hurt. Ubuntu had to disable Shark to get openjdk-6 built for armel.
Regards,
Hi!
My own testing indicates that it are possible to run a Shark build compiled on a arm Ubuntu Jaunty system on a thumb2 system such as Ubuntu Maverick or Lucid.
Have you tested to run the Debian squeeze llvm and openjdk-6-jre-zero packages on Maverick? It might work.
If you want to build LLVM using the Maverick thumb toolchain then you have to make sure to compile the LLVM libraries for -marm and possibly compile the shark libjvm.so as -marm as well and double check that LLVM actually uses the ARM JIT backend instead of the Thumb backend. LLVM switches on the Thumb JIT backend by default (at compile time) if it have autodetected the host system to be a Host: thumb-unknown-linux-gnueabi.
Upstream Ubuntu bugreport:
https://bugs.launchpad.net/llvm/+bug/513735
Upstream LLVM bugreports to implement Thumb JIT support are:
http://llvm.org/bugs/show_bug.cgi?id=6065 fix so that llvm can be compiled with a thumb toolchain.
http://llvm.org/bugs/show_bug.cgi?id=6223 - ARM thumb target fails to JIT tPUSH
A sidenote, LLVM currently supports generating thumb code during static compilation using llc.
The LLVM Thumb JIT are on a good way to get finished, it currently nows what instructions it needs to JIT but it dont know how the machinecodes should look like in memory.
By implementing how the different thumb instructions look in memory would makes it possible to complete the thumb JIT.
Cheers
Xerxes