13.10.2014 Views

OPTIMIZING THE JAVA VIRTUAL MACHINE INSTRUCTION SET BY ...

OPTIMIZING THE JAVA VIRTUAL MACHINE INSTRUCTION SET BY ...

OPTIMIZING THE JAVA VIRTUAL MACHINE INSTRUCTION SET BY ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

34<br />

Nisbet. Their work made use of an automatic interpreter generation tool named<br />

vmgen. It has been used to generate interpreters which included super instructions<br />

for both Forth and Java [47]. In their study, three virtual machines were generated.<br />

Each virtual machine considered super instructions of a single length. The super<br />

instructions were identified based on profiling data collected from two applications.<br />

Few additional details are provided about the technique used to identify the bytecode<br />

sequences replaced with super operators except for an indication that they did not<br />

explore building a virtual machine with a set of super operators of variable length.<br />

The super instruction lengths considered were 2, 3 and 4 bytecodes.<br />

Casey et. al. also published a second work involving super operators [33]. In this<br />

study a static analysis of Java class files was employed in order to select bytecode<br />

sequences to be represented by super operators. This choice was made based on the<br />

fact that previous work on Forth showed that this selection strategy was effective [55].<br />

However, it has been shown that the static and dynamic distributions of bytecodes<br />

for Java applications are not correlated in many applications [43].<br />

The notion of Semantically Enriched Code (sEc) was developed by researchers<br />

at Hewlett-Packard Laboratories [116]. The general idea was to identify those basic<br />

blocks that execute with greatest frequency and introduce a mechanism for handling<br />

them with a single instruction. This was accomplished by annotating the class file<br />

with sEc-hook information that indicates the method descriptor, offset and number<br />

of instructions that should be replaced with a new sEc bytecode. A new class loader<br />

was introduced to identify the presence of this annotation and handle the basic block<br />

as a special case. Alternatively, the virtual machine could be modified ahead of time<br />

along with the code attributes of the Java class file, replacing the basic block with a<br />

new opcode. The performance results presented in the sEc study consider only the<br />

static replacement of two basic blocks in a single benchmark.<br />

Each of these areas of previous work shares some commonality with the multicode<br />

work presented in Chapter 7. However, the multicode work is distinct in that it<br />

considers the creation of new opcodes that completely replace the previously existing<br />

sequences. This is distinct from the work conducted by Casey et. al. who replaced<br />

only the first opcode in the sequence, leaving the remaining opcodes in place. Multicodes<br />

are also distinct from Casey et. al.’s work in that sequences of as many as<br />

50 bytecodes are considered for replacement compared to sequences of 4 bytecodes or<br />

less in Casey et. al.’s work.<br />

Multicodes are distinguished from the sEc work by the fact that arbitrary bytecode<br />

sequences are considered. In the sEc implementation, a sequence of bytecodes

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!