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.

124<br />

predominately contributed by a single benchmark. The following constants had at<br />

least 90 percent of their contribution from a single benchmark:<br />

• dconst 1: 97.93% from JGF Series<br />

• ldc (int)65535: 99.74% from JGF Crypt<br />

• ldc2 w (long)65535: 100.00% from JGF Crypt<br />

• ldc2 w (long)65537: 100.00% from JGF Crypt<br />

• bipush 0x0f: 99.64% from 222 mpegaudio<br />

• ldc (int)1050011:: 100.00% from JGF Search<br />

• bipush 0x28: 99.05% from sympjpack-t<br />

• ldc (int)58399: 100.00% from 202 jess<br />

• bipush 0x18: 90.64% from sympjpack-t<br />

As a result, the constant values listed in the preceding list are not considered to be<br />

good candidates for specialized bytecodes. Instead, it is recommended that specialized<br />

bytecodes concentrate on values that are frequently used by a wide variety of<br />

applications. As Table 6.1 and the preceding list show, the broadly used values are<br />

typically small integers.<br />

The list of the 40 least executed constant loading bytecodes was also examined.<br />

The list is not included here because it does not show any interest results. It simply<br />

consists of a variety of constant values that are used extremely infrequently, none of<br />

which are generated by any of the const specialized bytecodes.<br />

In addition to considering the constant values executed, the distribution of constant<br />

pool indices accessed by the ldc, ldc w and ldc2 w bytecodes was also examined.<br />

These instructions are used to copy a value from the constant pool onto the operand<br />

stack. When a category 1 value is loaded from the stack either an ldc bytecode or<br />

an ldc w bytecode can be utilized. The ldc bytecode only takes one operand byte,<br />

allowing it to access constant pool indices 1 through 255. If the constant value resides<br />

at index 256 or greater, the ldc w bytecode must be employed. It was observed that<br />

when category 1 values were loaded from the constant pool, an ldc bytecode was<br />

used 99.94 percent of the time because the index for the value being loaded was less<br />

than 256. It was necessary to use an ldc w bytecode the remaining 0.06 percent of

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

Saved successfully!

Ooh no, something went wrong!