Runtime Components
The previous section described getting Jikes RVM to a point where it is ready for execution. In this section, we look at the main runtime components of Jikes RVM, beginning with those directly responsible for executing Java bytecode, and then look at some of the other virtual machine subsystems that support this execution.
Basic Execution Model
Jikes RVM does not include an interpreter; all bytecodes must first be translated by one of Jikes RVM’s compilers into native machine code. The unit of compilation is the method, and methods are compiled lazily when they are first invoked by the program. This initial compilation is done by Jikes RVM’s baseline compiler, a simple nonoptimzing compiler that generates low-quality code very quickly. As execution continues, Jikes RVM’s adaptive system monitors program execution to detect program hot spots and selectively recompiles them with Jikes RVM’s optimizing compiler. This is a significantly more sophisticated compiler that generates higher-quality code, but at a significantly larger cost in compile time and compiler memory footprint than the baseline compiler.
This selective optimization model is not unique to Jikes RVM. All modern production JVMs rely on some variant of selective optimization to target optimizing compilation resources to the subset of the program’s methods where they will yield the most benefit. As discussed earlier, selective optimization is the key to enabling the deployment of sophisticated optimizing ...
Get Beautiful Architecture now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.