author: Lukas Miedema
title: Internship at aicas GmbH
company: aicas (Karsruhe, Germany)
keywords: Jamaica VM, Accelerator tool,
topics: Software Technology
committee: Marieke Huisman
started: February 2019
end: June 2019

Abstract

My assignment
One key aspect of JamaicaVM – one where it differs from many other Java Bytecode VMs – is that
it doesn’t have a Just-In-Time (JIT) compiler. This is in part because a JIT produces very good peak
and average-case performance, but is not deterministic. Instead, JamaicaVM ships with two special
tools called the Builder and the Accelerator. Without going into too much detail: these two tools can
perform Ahead-Of-Time (AOT) compilation of JVM bytecode to machine code, boosting
performance without a JIT. The team that maintains this is called the Tools team, and as part of my
assignment I worked within this team.
My assignment was to work on the Accelerator tool. This tool takes a JAR file and compiles all the
bytecode in that file to native code. Then, it adds all this native code back to the JAR file as a
shared library. At runtime, when loading this JAR, JamaicaVM sees this native code and use it
instead of interpreting the bytecode.
This native code has unique ways of interacting with JamaicaVM – it needs to be as fast as possible,
and as such has deep dependencies on structures within the VM. My assignment was to take a look
at how this interaction takes place and improve it by defining a clear interface between the VM and
the accelerated code. I designed a new VM Public Interface – an interface via which the native code
generated by the Accelerator can interact with JamaicaVM. This is a first step in making the
interaction between the compiled bytecode and JamiacaVM easier to maintain.

Additional Resources

  1. Internship summary