[yocto] enable Shark support in JAVA + list of alternative JVM for use in combination with OpenJDK on PowerPC
Xerxes Rånby
xerxes at zafena.se
Fri Nov 8 00:34:55 PST 2013
Hi Sonia
2013-11-08 07:43, sonia verma wrote:
> I am not able find LLVM compiler for PowerPc.Due to this I'm not able to integrate JAVA in compiler mode on PowerPc board.
If you still want to test Shark you need to first build and test LLVM on powerpc.
http://llvm.org/
It is wise to build and test LLVM manually on a PowerPC gnu/linux system before you spend time to update meta-java and oe to cross compile it.
By running the llvm testsuite you will know if the jit work or not on powerpc.
After you have made llvm pass its tests then try build openjdk + shark manually on a powerpc system.
The last known build of shark was made about a year ago buy Roman Kenkke
http://rkennke.wordpress.com/2012/11/28/the-return-of-the-shark-part-ii-howto/
Roman only tested shark on x86 thus it is expected that you will find things that needs to get fixed before the port work on powerpc again.
The last known test builds of shark for powerpc was made around 2010 and both openjdk, llvm and the shark jvm code have changed since then.
> Can you suggest any alternative for that.
There is a PowerPC Hotspot JVM available for use with OpenJDK maintained by the ppc-aix-port (it also work on linux!), it includes a mixed-mode VM (with the C++ Interpreter and the C2 "Server" JIT compiler).
http://openjdk.java.net/projects/ppc-aix-port/
https://wiki.openjdk.java.net/pages/viewpage.action?pageId=13041681
I recommend you to update meta-java to build this port for use on PowerPC.
This is the most actively maintained OpenJDK PowerPC port.
You may also want to take a look at using the JamVM, CACAO JVM or Avian on PowerPC.
These JVM's are maintained outside the OpenJDK community, they are created to enable Java to run on various embedded and mobile platforms and are all designed to work in combination with the OpenJDK runtime classes.
You can compile JamVM, Cacao or Avian into a libjvm.so that can replace the Zero libjvm.so to be used by your current OpenJDK build.
They all give a magnitude better performance compared to using Zero.
JamVM source & build instructions:
http://git.berlios.de/cgi-bin/cgit.cgi/jamvm/
http://draenog.blogspot.se/2011/02/openjdkjamvm-git-repository.html
JamVM is easy to compile and test. I have tested JamVM a lot and I find it stable for use by many different use-cases.
JamVM is carefully designed to correctly execute non-trivial java code that make heavy use of reflection. JamVM also implements the new invoke dynamic bytecode JSR292 used by OpenJDK 7 & 8 and later.
JamVM implements state of the art interpreter optimization techniques written in portable c, if you study JamVM source-code you will notice how the various interpreter optimizations all combine to implement a code copying JIT.
CACAO JVM source & build instructions:
http://www.cacaojvm.org/
CACAO implements a compile-only JIT.
CACAO is a research JVM maintained by the university of Vienna.
http://c1.complang.tuwien.ac.at/cacaowiki/ResearchTopics
http://c1.complang.tuwien.ac.at/cacaowiki/StateOfArchitectures - CACAO will require work into JMM barriers before this JVM can be used reliably on multi-core PowerPC systems.
Avian source & build instructions:
http://oss.readytalk.com/avian/
http://oss.readytalk.com/avian/examples.html
Avian fills a special niche where you can bundle the JVM with your application and only include a subset of the OpenJDK runtime classes needed create a standalone executable under 1mb of size.
Cheers
Xerxes
> On Sun, Nov 3, 2013 at 11:29 PM, Andrew Haley <aph at redhat.com <mailto:aph at redhat.com>> wrote:
>
> On 10/31/2013 03:10 PM, sonia verma wrote:
> > adding zero-dev in loop.
> >
> >
> > On Thu, Oct 31, 2013 at 8:38 PM, sonia verma <soniaverma9727 at gmail.com <mailto:soniaverma9727 at gmail.com>>wrote:
> >
> >> Hi ALL,
> >>
> >> I have integrated Java in one of the board having Powerpc architecture
> >> using meta-java. By default it cam with Zero port support which only works
> >> in interpreter mode.
> >>
> >> I need to enable Shark support in that. Can any one please help me with
> >> the procedure to compile JAVA with Shark support.
>
> Well, what help do you need? You're going to have to find LLVM
> for PowerPC and start doing some integration work.
>
> Andrew.
More information about the yocto
mailing list