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.

65<br />

Test Total Weighted<br />

Condition Performance Average<br />

Change (s) (Percent)<br />

Base 0.00 0.00<br />

Load -0.26 -0.15<br />

Store 1.36 0.78<br />

Load Store 0.74 0.42<br />

Branch -2.38 -1.36<br />

Constant 0.43 0.25<br />

Constant Widening -0.98 -0.56<br />

LSC 0.17 0.10<br />

LSCB -2.04 -1.17<br />

Complete -3.89 -2.23<br />

Table 4.8: RVM Performance<br />

tual machine would be smaller than those observed for the Kaffe interpreter. This<br />

assessment is based on the fact that many of the despecializations performed will not<br />

impact the final machine code generated by the JIT compiler.<br />

Consider the following example. When a specialized load bytecode is converted to<br />

machine code the JIT compiler generates the machine language instructions necessary<br />

to load the local variable specified by the opcode. When a general purpose load<br />

bytecode is compiled, the same instructions are generated to copy the value from<br />

the local variable storage to the stack. In this case, the position that is copied is<br />

dictated by an operand in the code stream. However, this operand is a constant value<br />

that cannot change during the execution of the application. Consequently, when<br />

JIT compilation is performed, the operand specifying the local variable to load can<br />

be used directly, generating machine code that is just as efficient as that generated<br />

for the specialized bytecode. The only overhead introduced as a consequence of this<br />

despecialization is the small amount of extra work that must be performed during JIT<br />

compilation to decode the operand specifying the local variable and the extra time<br />

related to loading the despecialized class file which is slightly larger than the original<br />

class file. Each of the operations that have extra costs associated with them occur<br />

once when the application is executed. In an interpreter, the overhead associated<br />

with decoding extra operands are imposed every time the despecialized bytecodes are<br />

executed, causing the overhead to impact the performance of the application many<br />

times throughout its execution.<br />

Table 4.8 shows a summary of the performance results observed when the IBM’s<br />

RVM was tested. It is observed that performing Complete despecialization slows the

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

Saved successfully!

Ooh no, something went wrong!