next up previous
Next: Source-Level Instrumentation Up: Integration and Application of Previous: Performance Analysis for

Selective Instrumentation

 

In examining the data output of a performance instrumented Java application, we notice that there is a significant amount of data about the internal workings of the JVM (e.g., see Figure 6). While this may provide a wealth of useful information for the JVM developer, it could inundate the application developer with superfluous details when a more selective focus is desired. To avoid making performance measurements for all system classes, the TAU Java instrumentation system must be extended to selectively disable certain events from measurement. How is TAU informed of which events to disable? Since Java classes are packaged in a hierarchical manner, our approach is to allow the user to specify a list of classes to be excluded, on the TAU instrumentation command line. For instance, if the user specified java/lang, sun in the exclude list, TAU should then eliminate all java/lang/* classes and sun/* classes from consideration.

 

 [bigger image]


Figure 6: Vampir dynamic calltree display on each thread shows the calling order annotated with performance metrics

  [bigger image]
Figure 7: Vampir communication matrix shows the extent of inter thread communication

Shown below are the command line statements to run a java application, run a java application with TAU instrumentation fully enabled, and run a java application with TAU instrumentation selectively enabled:

% java <app> <args>
% java -XrunTAU <app> <args>
% java -XrunTAU:exclude=java/lang,sun <app> <args>

The implementation of this selective instrumentation in TAU is complicated by JVMPI processing. JVMPI allows the in-process profiling agent to enable and disable the notification of events using its event API. However, if the agent tries to disable the notification of the method entry or exit event, it affects all methods of a class, and not just methods that belong to a certain class. That is, the disabling has to do with events of type ``method,'' not particular method events. This makes selective instrumentation difficult. Instead, TAU leaves method events enabled, but implements selection by comparing the name of a class with the ``exclude list'' specified by the user. This comparison is done when a class is loaded at runtime. If the class name is excluded, a flag is then maintained in each class method timer, indicating that instrumentation is disabled. At runtime, when the method executes, JVMPI informs TAU about method entry and exit events, and TAU in turn checks to see if its instrumentation is disabled by examining this flag and processes the event accordingly. Currently, the level of instrumentation granularity is the class, but we are looking into ways to refine the granularity of selection to class methods.



next up previous
Next: Source-Level Instrumentation Up: Integration and Application of Previous: Performance Analysis for



Sameer Suresh Shende
Mon Mar 12 14:44:42 PST 2001