[kaffe] Kaffe for Arm-Linux

Boone, Jared Jared.Boone@digicont.ch
Mon Mar 17 08:20:02 2003


Hi All,

I am currently developing an embedded Linux system with a Motorola
Dragonball MX1 processor (Arm 920T core) and I am interested in using
the Kaffe VM to run Java applications.=20

The FAQ.embedded and FAQ.classlibrary-compile documents in the Kaffe
source tree helped me reduce Kaffes ROM footprint. My biggest hurdle to
date was overcoming erratic memory behavior with the JIT. I was seeing
seemingly non-deterministic "Segmentation fault" and "Illegal
Instruction" error messages. This was solved by applying a processor
specific patch to the linux kernel to change TLB caching strategy from
Pseudo-Random to Round-Robin. More information about this problem can be
found on the arm-linux mailing list archives, although I believe the
patch listed there is incomplete. If anyone is interested in the patch,
please contact me and I will try to make it available.

Right now my focus is on improving the performance of Kaffe in running
my Java application, specifically the startup time and the memory
consumption. I am generally interested in benefitting from your
experience and advice. I also have some specific questions:

ZipInputStream.getNextEntry() seems to use up a lot of RAM for large zip
entries. Kaffe's ram usage jumps by 1.4 Mb when I call this method on a
ZipInputStream constructed from a FileInputStream for a 4mb zip file
with a single entry. This is causing "Out of Memory" errors on my
embedded device. I expect a ZipInputStream to use a small buffer for
reading zip entries, as with a FileInputStream. Is there a way to read a
zip entry without using so much RAM?=20

My application loads a lot of classes. Is there a faster alternative to
java.lang.ClassLoader.defineClass(null, byte[], int, int)? How difficult
would it be to further optimize
kaffe/kaffevm/methodClass.c:processClass() for performance?

Is anyone out there actively working on a port of the JIT3 engine for
Arm Linux?

Thanks,
Jared Boone