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.

265<br />

to emit four files that were subsequently included into the virtual machine during the<br />

compilation process instead of requiring it to patch the existing files.<br />

The virtual machine generation tool outputs four distinct files that enable the<br />

Kaffe virtual machine to support multicodes. The first contains the declaration of an<br />

array that specifies the size of each bytecode including its operands. Two additional<br />

files describe the tasks that must be performed as part of verifying the correctness<br />

of the class files at the basic block and method level. It is important to note that if<br />

Kaffe is extended to fully implement the verification procedure required by the Java<br />

Virtual Machine Specification then it will likely be necessary to generate several more<br />

files to update a full verifier. The final file generated contains the codelets for all of<br />

the bytecodes supported by the interpreter, including the new multicodes.<br />

B.5 Benchmark Performance Testing Scripts<br />

In order to generate the performance results presented in this thesis, it was necessary<br />

to execute many benchmarks using several different versions of the class files that<br />

represent them. It was also necessary to use the corresponding versions of the Java<br />

library. The following sections describes the scripts used for the despecialization and<br />

multicode studies.<br />

B.5.1<br />

Despecialization Scripts<br />

The first despecialization study conducted used a different script for each virtual<br />

machine tested. This script measured the performance of each benchmark using all<br />

of the rule files located in a prescribed subdirectory. It was responsible for applying<br />

the rule file to every class in the benchmark being tested, every class in the Java<br />

library and invoking the virtual machine in such a manner so as to ensure that only<br />

those classes were utilized. These scripts were subsequently generalized so that a<br />

single script could be used to test an arbitrarily large number of virtual machines.<br />

The timing script executed each benchmark several times. By default, 6 iterations<br />

were used. However, this value could be changed by updating the value of a single<br />

constant within the script. The output from the timing script included an indication<br />

of each rule file tested and the actual output generated when each benchmark was<br />

executed. A separate script was used to parse the performance results. It reported<br />

the average performance of each rule file tested for each benchmark after the highest<br />

and lowest run times were discarded in order to minimize the impact of outliers.

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

Saved successfully!

Ooh no, something went wrong!