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.

40<br />

3.3 Profiling<br />

Much of the work presented in this thesis makes use of data collected by profiling Java<br />

applications. Section 3.3.1 describes some mechanisms that are available for collecting<br />

profile data for Java applications. Other studies that collected and evaluated profile<br />

data from Java applications are discussed in Section 3.3.2.<br />

3.3.1 Gathering the Profile Data<br />

All of the profile data used during the studies presented in this thesis was collected<br />

by modifying an existing Java Virtual Machine. These modifications introduced the<br />

data structures necessary to store the collected profile data and the hooks necessary<br />

to detect events of interest when they occurred. The choice to profile the applications<br />

in this way was made because implementing multicodes already necessitated making<br />

modifications to the Java Virtual Machine. As a result, the structure of the Java<br />

Virtual Machine and the location of the required data was already known. Collecting<br />

the profile data in this manner also offered maximum flexibility, providing raw,<br />

unfiltered access to the internal workings of the virtual machine as the application<br />

ran. However, other options for profiling Java applications do exist. These options<br />

are briefly discussed in the following subsections.<br />

The JVM Tool Interface<br />

The Java Virtual Machine Tool Interface (JVMTI) [106] is a new addition to version<br />

1.5.0 of the Java platform. It replaces the Java Virtual Machine Profiling Interface<br />

(JVMPI), removing many of the limitations imposed by the older interface [86]. This<br />

interface is intended for the development of tools that monitor or record the state of<br />

the Java Virtual Machine as it executes applications. It also provides the functionality<br />

necessary to develop debugging, thread analysis and coverage analysis tools.<br />

The JVMTI provides a two-way interface. An application that uses the JVMTI<br />

to examine the virtual machine, referred to as an agent, can query the status of the<br />

virtual machine directly using functions. An agent can also be notified when certain<br />

changes within the virtual machine occur through events. Agent applications can be<br />

developed in C, C++ or any language which supports C calling conventions.<br />

This interface is related to the material presented in this thesis in that it provides<br />

the capability to collect a large amount of information about the bytecodes executed<br />

by the application. In particular, it can be employed in such a manner so as to record

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

Saved successfully!

Ooh no, something went wrong!