Java is one of the most popular programming languages for thedevelopment of portable workstation and server applications availabletoday. Because of its clean design and typesafety, it is alsobecoming attractive in the domain of embedded systems. Unfortunately,the dynamic features of the language and its rich class library causeconsiderable overhead in terms of runtime and memory consumption.Efficient techniques to implement Java virtual machines that aresuitable for use in resource constrained environments are thusneeded. In this work we present a solution for very restrictedenvironments based on CACAO. CACAO is a just-in-time compilingvirtual machine implementation, combining high speed and small size.We have modified the original version of CACAO to run without anunderlying operating system within only 1~MB of memory. In additionwe present a new technique to selectively compile methods during theinitialization phase of real-time Java applications to preventunwanted interaction between dynamic compilation and critical tasks.Furthermore we present the YARI soft-core as the execution platformof CACAO within an field-programmable gate array. We compare ourimplementation with two well known Java processors, JOP and Sun'spicoJava-II, on the same technology. Although JOP achieves a higherclock frequency and picoJava-II occupies nearly 4 times the resourceof YARI, our solution is capable to outperform both of them by afactor of up to 2.8 and 2.2 respectively.
['Florian Brandner', 'Tommy Thorn', 'Martin Schoeberl']
Embedded JIT Compilation with CACAO on YARI