Viewing invocations and callers of a method
Using the Method Invocation view you can quickly cycle through the invocations of a selected method. Prerequisites:
- Launching or attaching to an application
- In specifying profiling criteria, the Execution History - Statistical profiling set is selected or the Time Analysis with Show execution statistics (compressed data) profiling set is enabled in a custom profiling set.
There are a number of ways to view the invocations and callers of a method.
Using the Method Invocation view
- In Profiling and Logging perspective, select either the monitor or the agent in the Profiling Monitor view.
- Right-click and select Open With > Execution Statistics. The Execution Statistics view opens.
- Select Execution Statistics tab using the label in the bottom of the view.
- Click Method
from the toolbar to display the method statistics.
- In the Execution Statistics tab select a method that you want to examine.
- Right-click and select Show Method Invocation. The Method Invocation tab opens.
- Right-click and select Refresh Views
to ensure that you are displaying current data. Note the line:
This line displays the name of the method, followed by n/m, where n is the invocation that is currently displayed out of a total of its m invocations.
- Click Previous
and Next
to browse all invocations of the selected method (or each message to the selected object). The fraction on the toolbar changes to indicate which invocation you are viewing.
- To view the caller of the method, click the Show Caller button
. The method is displayed along with its caller to the left of it.
- To view more details about the caller of the method for each new invocation that you view, positioning the cursor over the stripe that represents the caller in the view. The status line displays the caller's information.
- To see the method that a selected method calls, click the Show Called Method button
.
Using the Method Invocation Details tab
- Repeat steps 1 to 5 as above to open the Execution Statistics tab and to select a method.
- Right-click and select Show Method Invocation Details. The Method Details opens.
- Details of the selected method, each method invoked by the selected method, and each method that invokes the selected method is displayed in the view in separate tables.
- You can continue to drill down into the methods by selecting a method in one of the tables, right-clicking, and selecting Show Method Invocation Details.
Related concepts
Overview of the Profiling ToolRelated tasks
Profiling an application
Launching or attaching a Java process
(C) Copyright IBM Corporation 2000, 2008. All Rights Reserved.