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. Click Method Method statistics icon from the toolbar to display the method statistics.
  4. In the Execution Statistics view, select a method that you want to examine.
  5. Right-click and select Show Method Invocation.  The Method Invocation view opens.
  6. Right-click and select Refresh Views  refresh button icon to ensure that you are displaying current data.  Note the line:
    status line showing method name and 1/1
    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. 
  7. Click Previous previous button icon and Next next button icon 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.
  8. To view the caller of the method, click the Show Caller button caller method button icon. The method is displayed along with its caller to the left of it. 
  9. 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.
  10. To see the method that a selected method calls, click the Show Called Method button called method button icon

Using the Method Invocation Details view

  1. Repeat steps 1 to 3 as above to open the Execution Statistics view 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