zafena development

October 9, 2009

The results displayed are generated using the debug build of shark, with assertions, that I made on the 6th of October compared against release builds of the pure zero cpp interpreter and the optimised zero assembler interpreter, both from Icedtea6-1.6.1.

Did we gain anything from having a jumping shark? By taking a quick peek at the graph you can quite quickly spot some 15X+ speed improvements so yes! yeah!, the shark JIT indeed got some sharp toots in its yaws! I am quite delighted to see that some parts of the benchmark got a 25x+ speed boost!
There are still some rough spots that can be identified that of course needs some polishing, so let me share some ideas on how to make the Shark JIT on ARM really shine.

As can be seen in the chart shark uses the zero cpp interpreter before the methods are jited and the extra overhead on running the JIT causes the zero interpreter to run slower during program launch on a single core ARM cpu, this penalty are removed once the initial warm-up have complete (somewhere around 300 to 500 compiled methods). New multi-core ARM Cortex-A9 CPU do not have this penalty since the compiler process are run in a separate thread and can be scheduled on a CPU of its own.

Some quick ways to fix the warm-up issue:
0. First of all I want to state that these results where generated using a debug build of shark, I have a build machine working on creating a release builds as I type so hopefully I will be able to generate some improved benchmark scores in the near future, especially to deal with the warm-up penalty.
1. A quick way to reduce the warmup penalty would be to make shark able to use the new assembler optimized interpreter instead of the pure cpp interpreter found in Icedtea6-1.6.1 and this could become a reality quite soon since they both share the same in memory structures. Also by using the new assembler optimizations would make Shark JIT more usable as a client JVM where initial GUI performance are crucial, and in this GUI area the assembler interpreter really shine.
2. I have also identified some parts in the LLVM JIT that could be quickly improved to make the LLVM JIT jitting faster. Basically I want to make the LLVM tablegen generate better lookuptables to speed up the instruction lowering, currently shark spends quite a large deal of time here running the LLVM ExecutionEngine::getPointerToFunction(). I think by generating some improved formatter code for the LLVM tablegen backend could quite quickly improve the autogenerated .inc files used for the target instruction lowering.
3. Examine the posibility to implement a bytecode cache in Shark to jumpstart the JIT even further. By making the JIT able to load precalculated LLVM IR or in memory representations of the methods would reduce some of the JIT overhead on program launch.
4. Add a PassManager framework to Shark to simplify the LLVM IR before it reaches the JIT. The tricky part are to select what passes to use and in what order to use them. If done correctly then this might both lower jitting time and improve the generated machine code quality.

September 24, 2009

4 running ARM developement boards are hidden in this picture, can you find them?

The ARM developement gear that I have access to have been rapidly upgraded during the past months and I do no longer experience any memory or storage bottlenecks. The boards in the picture are running native compiles, running checks and debugging sessions 24/7 to help mankind to deliver the next generation OpenJDK ARM builds using Zero and Shark and makes sure the software that will power our future to be as stable and fast as possible. I belive these small cool and silent boards will help us save the environment as well since this new energy efficient technology enables the transition to a information society where the whole IT infrastructure can become self supplying from simple solar power panels! Thanks to free-software like Linux and GNU , that are running on these small power efficient computers, that makes the new power efficient green computing future possible!

September 18, 2009

Dear Jalimo users!

I have pushed a quite massive patch into the Jalimo sourcetree to make all OpenJDK 6b16 recipe’s in sync with and able to cross-compile the latest Icedtea6-1.6.1 release!

So… What’s New?
—————–
- Security fixes for:
CVE-2009-2670 – OpenJDK Untrusted applet System properties access
CVE-2009-2671 CVE-2009-2672 – OpenJDK Proxy mechanism information leaks
CVE-2009-2673 – OpenJDK proxy mechanism allows non-authorized socket connections
CVE-2009-2674 – Java Web Start Buffer JPEG processing integer overflow
CVE-2009-2675 – Java Web Start Buffer unpack200 processing integer overflow
CVE-2009-2625 – OpenJDK XML parsing Denial-Of-Service
CVE-2009-2475 – OpenJDK information leaks in mutable variables
CVE-2009-2476 – OpenJDK OpenType checks can be bypassed
CVE-2009-2689 – OpenJDK JDK13Services grants unnecessary privileges
CVE-2009-2690 – OpenJDK private variable information disclosure
- FAST interpreter for ARM, now with gcc 4.1.2 support!
- Timezone fix: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=377
- Stackoverflow error fix:
http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=381
- Backport regression (NPE) fix for AccessControlContext fix
- Bump to hs14b16

The following people helped with this release:
Gary Benson, Deepak Bhole, Andrew Haley, Andrew John Hughes, Mark
Wielaard, Lillian Angel, Matthias Klose, Ed Nevill, and many others.

We would also like to thank the bug reporters and testers!

Cheers and have a great day!
Xerxes

June 10, 2009

IcedTea is served: openjdk/build/linux-i586
mkdir -p stamps
touch stamps/icedtea.stamp
printf — ‘-cacao ERROR\n’ >> openjdk/build/linux-i586/j2sdk-image/jre/lib/i386/jvm.cfg
touch stamps/add-cacao.stamp
printf — ‘-zero ERROR\n’ >> openjdk/build/linux-i586/j2sdk-image/jre/lib/i386/jvm.cfg
touch stamps/add-zero.stamp
xerxes@labbserver:~/icedtea6$ openjdk/build/linux-i586/j2sdk-image/bin/java -version
java version “1.6.0_0″
OpenJDK Runtime Environment (IcedTea6 1.5-rce70ed27635c) (build 1.6.0_0-b16)
OpenJDK Shark VM (build 14.0-b15, mixed mode)
xerxes@labbserver:~/icedtea6$

April 15, 2009

Why going to hell in the first place?
During the past year I have involved myself in the porting effort of OpenJDK to various embedded systems using the Icedtea build system. Unfortunally the embedded development boards that I had access during last year where equiped with inadequate amounts of RAM making it practically impossible to build Icedtea directly on native hardware. I learnt how to workaround this by using emulated hardware with more RAM using QEMU, now the compilation process of Icedtea was doable, yet it still took a week to compile Icedtea6 using QEMU. urgh…

I spent some time in my personal created emulator hell watching time pass by and always feeling behind not working on the current code base like all other freejava hackers. I finally decided something had to be done about this and wanted to break free.

My liberation was made possible by first scouting for a build environment suitable for rapid cross compilation and porting development of OpenJDK for any hardware architecture imaginable, including your toaster. Lucky for me I got to know about the Jalimo project and even got the chance to meet one of its core developers Robert Schuster during FOSDEM09. Robert demonstrated how easy embedded Java development could be using the Jalimo infrastructure and it provided me with all the tools I needed to speedup my compile run and test cycle, I was no longer in need of a emulator instead I could build binarys swiftly using the full power of an affordable IA32 quadcore cpu (with 12Mb of cache) and deploy my work for testing on real hardware for debugging within ohurs not days, simply bliss.

It took some time for me to understand how the four required pieces openembedded, bitbake, jalimo and my own goal could be merged, it turned out they where designed to fit!
First openembedded bitbake and jalimo where all three downloaded from their respecive svn or git trees
The only tricky part was that I (the user) needs to provide configuration files containing the basic information of what kind of target i want to crosscompile against and specify what bundles of recipe I want to use to accomplish this, basically I had to express my mind in a way that bitbake understood.

Once this was setup I could stand in any directory and start the build by simply typing:
bitbake openjdk-6
… or any other software package as long I knew the name of the recipe to use.
Even bitbake openjdk-6-shark builds out of the box!

Within a day playing with bitbake my build computer had downloaded 2gig of sourcecode, eaten several gigs of harddrive space. Rather cool… It had built all cross compilers tools I needed, compiled all dependent librarys, from scratch and all optimised for the target hardware that I wanted to run and debug the binarys on.
The final result was then obtained in the temp directory of my choice.

I have documented my work crosscompilation experiences on the Icedtea wiki:
http://icedtea.classpath.org/wiki/CrossCompileFaq

Cheers and have a great day!
Xerxes

February 28, 2009

Cheers!

Cheers to you from Xerxes and JeNI on this flashy picture!

I have prepared for your amusement some photogallerys from the pictures I took at FOSDEM 09.
# Free Java - FOSDEM 09 photography - Arrival and first day
# Free Java - FOSDEM 09 photography - First night and dinner
# Free Java - FOSDEM 09 photography - Second day
# Free Java - FOSDEM 09 photography - The day after - a great experience

It was thrilling meeting you all during the event, many thanks to SUN for sponsoring the Free Java devroom dinner!
I will fill in more photos for the second day so stay tuned. If you are portraited in any of these photos and would prefer not to please let me know ASAP: xerxes at zafena dot se .

February 9, 2009

Mecanics performing some handson debugging.

On my flight home from FOSDEM 09 i got some experience of howto debug an airplane. The airplane I was traveling in was accelerating up to flightspeed on the runway when it suddenly started to wiggle. The pilot responded by making a emergency halt just seconds before airborne. It turnedout that the pedals the pilot used to stear the plane in flight was faulty wired and made the airplane turn in the opposite direction to how the pilot manuvered the planes pedals (ouch, not good).

Im gratefull my airliner did not simply try the three R’s of windows to solve the problem like what Joseph D. Darcy had experienced done by his airliner. Instead of retrying to make a new takeoff my airliner drove the airplane back to the airport and sent in a lot of mecanics to do some handson debugging. They quickly decided to make a new new airplane “build” based on the same crew, passengers and baggage in a new yet identical plane, they also did extended and rigerous regression testing to see that the pedals was wired correctly this time.

It seems airlines have adopted the use of pre flight regression tests to minimize the time spent of inflight debugging. Perhaps developers have more to learn from aviation best practise?

The word debugging have been used years before admiral Grace Hopper found the first famous computer bug stuck inside one of the Mark II Computer at Harvard University. Debugging actually orgins from the context of aviation, more specific from finding faults in airplane engines. So i guess to bugger is when one installs faults in airplane engine and to debug is when someone removes them, on second thought perhaps to debug are simply the task of swiping off all bugs that got trapped inside and gradually clogging up the engine after a normal flight.

Powered by WordPress