VMKit: a substrate for virtual machines
The VMKit project is a framework for building virtual machines. It uses LLVM for compiling and optimizing high-level languages to machine code, and MMTk to manage memory. J3 is an implementation of a JVM with VMKit. You can get and build the source of J3 today.
Features
VMKit provides the following features:
End-User Features:
- Precise garbage collection.
- Just-in-Time and Ahead-of-Time compilation.
- Portable on many architectures (x86, x64, ppc32, ppc64, arm).
Developer Features:
- Relatively small code base (~ 20k loc per VM)
- Infrastructure for running multiple VM/applications in a single process
- Infrastructure for virtual machine research and development
Why?
The development of VMKit was started out of a need to factorize virtual machine development. The JVM and CLI virtual machine have many similarities, but are too high-level to be the basis of a "universal" virtual machine. The LLVM IR on the opposite is low-level enough to be able to execute these VMs. VMKit is a proof of concept implementation towards that direction.
Paper on the design of VMKit:
The PhD thesis that initiated VMKit:
An introduction to VMKit can be found in the following video lectures:
- Presentation of VMKit/MMTk at the 2009 LLVM Developer's Meeting
- Presentation of VMKit at the 2008 LLVM Developer's Meeting
Current Status
VMKit currently has a decent implementation of a JVM. It executes large projects (e.g. OSGi Felix, Tomcat, Eclipse) and the DaCapo benchmarks.
The JVM has been tested on Linux/x64, Linux/x86, Linux/ppc32, MacOSX/x64, MacOSX/x86, MacOSX/ppc32. The JVM may work on ppc64. Support for Windows has not been investigated.
Get it and get involved!
Start by getting the code, building it, and playing with it. This will show you the sorts of things we can do today.
Once you've done that, please consider getting involved in the VMKit community. Currently, VMKit is tightly integrated into the LLVM community. You can sign up for the LLVM mailing list to ask and learn about how the project works.