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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

186<br />

very large. These large scores occur because each sequence executes many times. Each<br />

of the benchmarks considered in this study execute more than 70 million multicode<br />

blocks. For some benchmarks, a single multicode block executes more than 1 million<br />

times. Consequently, the score for a sequence easily reaches into the millions when it<br />

is computed as the product of the sequence’s length (or its length minus 1) and the<br />

number of times it is executed.<br />

Recall that during multicode identification, each candidate sequence is assigned a<br />

score representing its potential to improve application performance. The cumulative<br />

score of a set of n candidate sequences is simply the sum of the scores assigned to each<br />

individual candidate sequence. Each line in Figure 8.1 plots the number of candidate<br />

sequences selected against the cumulative score for that set of sequences. The individual<br />

lines themselves are not particularly interesting, although they do effectively<br />

demonstrate the problem of diminishing returns associated with candidate sequence<br />

identification. However, comparing the two lines within each pair (one representing<br />

the cumulative score before despecialization, the other after despecialization), makes<br />

it possible to compare the relative expected optimization potential of multicode substitution,<br />

with and without despecialization.<br />

First, consider the bottom pair of lines, which are for the 213 javac benchmark.<br />

This pair is representative of all of the benchmarks except 201 compress<br />

and 202 jess. Note that the line for despecialization is consistently higher than for<br />

multicode substitution alone, indicating a higher optimization potential after despecialization<br />

than before. This result was expected because the amount of variability<br />

in the code stream has been reduced and because the number of bytecodes executed<br />

in the despecialized version is between 3.0 and 7.9 percent larger, depending on the<br />

benchmark being tested.<br />

Note however, that the top pair of lines show a different pattern. These lines were<br />

drawn using the data from the 202 jess benchmark. The 201 compress benchmark<br />

shows the same behaviour. In this case, selecting multicodes in the presence of<br />

despecialization provides better results initially. However, after a specific number of<br />

multicodes have been identified, the cumulative score with despecialization falls below<br />

the cumulative score without despecialization. Thus, whether multicode identification<br />

yields better results in the face of despecialization depends on how many multicodes<br />

are substituted. This result was not expected, but is understandable if one considers<br />

the fact that the multicode identification algorithm is not globally optimal. While<br />

each multicode identified is the best available at the time it is selected, each selection

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

Saved successfully!

Ooh no, something went wrong!