In this paper, we have presented SableVM, a framework for testing high-level
performance
enhancements
and extensions to the Java virtual machine.
SableVM is written in portable C with minimal system
dependecies.
The main goal of the SableVM project was the design and implementation of an open-source virtual machine suitable for research which is easy to modify, can simply handle language and bytecode extensions, and also provides a testbed for various implementation strategies.
Particularly, we have introduced in this paper new high-level techniques usable by any Java virtual machine (including JITs, and hybrid systems) to support efficient execution of Java bytecode.
More specifically, we have introduce a bidirectional object layout that groups reference fields, and we showed how this layout makes tracing objects and arrays simple and efficient.
We also introduced a sparse interface virtual table layout adapted to the dynamic class loading facility of Java, which reduces the cost of an invokeinterface instruction to that of an invokevirtual. We also demonstrated that the sparse representation need not waste memory, because unused holes in the interface table could be recycled and used by the class loader memory manager.
Our last performance enhancement technique was an improvement on thin locks. We introduced a simple algorithm and related data structures that eliminate busy-wait in case of contention on a thin lock. This strategy incurs no space overhead on object instances.
Other groups have expressed an interest in adding other components to the
VM, including a JIT compiler. We encourage such collaboration.
The
SableVM source is publicly-available
at:
https://www.sablevm.org/.