Viewing invocations and callers of a method

Using the Method Invocation view you can quickly cycle through the invocations of a selected method. Prerequisites:

There are a number of ways to view the invocations and callers of a method.

 

Using the Method Invocation view

  1. In Profiling and Logging perspective, select either the monitor or the agent in the Profiling Monitor view. 

  2. Right-click and select Open With > Execution Statistics. The Execution Statistics view opens.

  3. Select Execution Statistics tab using the label in the bottom of the view.

  4. Click Method from the toolbar to display the method statistics.

  5. In the Execution Statistics tab select a method that you want to examine.

  6. Right-click and select Show Method Invocation.  The Method Invocation tab opens.

  7. 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. 

  8. 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.

  9. 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. 

  10. 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.

  11. To see the method that a selected method calls, click the Show Called Method button

 

Using the Method Invocation Details tab

  1. Repeat steps 1 to 5 as above to open the Execution Statistics tab and to select a method.

  2. Right-click and select Show Method Invocation Details.  The Method Details opens.

  3. 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.

  4. 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 Tool

Related tasks
Profiling an application
Launching or attaching a Java process