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.

126<br />

Figure 6.5: Percentage of Methods Invoked by Number of Parameters<br />

6.2.4 Methods<br />

The descriptors for the methods invoked by the invoke* bytecodes were recorded.<br />

This made it possible to determine the number of parameters passed to each method<br />

as well as the static type of each method parameter and return value.<br />

When invokevirtual, invokeinterface and invokespecial are executed the<br />

receiver object is passed as the first parameter to the method. The receiver object<br />

is not included as part of the method’s descriptor. As a result, it had to be added<br />

during the analysis for those cases when it was present.<br />

Figure 6.5 shows the distribution of the number of method arguments to those<br />

methods invoked with any of the invoke* bytecodes. It includes two series of data.<br />

The first series, represented in gray, shows the number of formal method parameters<br />

declared by the programmer without including the receiver object. The second series,<br />

shown in black, shows the number of parameters actually passed to the method,<br />

including the receiver object when necessary. These distributions show that most of<br />

the methods invoked require one or two actual parameters with methods requiring<br />

three, four or five parameters also making contributions that are visible on the graph.<br />

The results of this analysis have already been employed in Section 6.2.1 when the<br />

utility of specialized load bytecodes was discussed. It is not yet know if this data may<br />

have any utility other than impacting the selection of specialized bytecodes.

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

Saved successfully!

Ooh no, something went wrong!