Identifying phases of program execution

Active threads within a program can be easily identified using the Execution Flow view of the Profiling Tool. Using the Execution Flow view will allow you to examine the threads within a program and quickly identify when and where most of a program's resources are spent.

Before you begin

It is necessary to complete the following steps to open and use the Execution Flow view:

  1. In the Profiling Monitor view, select a resource under a profile project, for example a monitor or an agent.
  2. Right click, then select Open With > Execution Flow. The Execution Flow view opens.
  3. In the Execution Flow view, each thread consists of a large number of method calls. The methods are represented by vertical stripes, progressing from left to right, and the active parts of the thread are identified by this left-to-right progression. Execution Flow view
  4. You can examine specific parts of the graph by zooming in to a particular area, using the Zoom in button toolbar button.

    Zoom in on Execution Flow view

    Similarly, you can use the Zoom out buttontoolbar button to zoom out.

  5. For sections of the graph that may be cluttered from repetitive calls due to iterative constructs, you can use the pop-up menu option Detect All Repetitions to consolidate the repetitions in the graph. The repetitive calls are marked with an X.n where n is the number of calls. In the example below, the getPackageName method is called 2 times. Detect All Repetitions

    Similarly you can use the pop-up menu option Hide All Repetitions to hide the repetitions in the graph.

About this task

  • When you select a method all its called methods are highlighted in yellow.
  • You can drag and drop the views on the workbench, arranging the layout of the perspective if needed.
  • Wherever you point the cursor, the corresponding base time is indicated in the status bar.
  • To reset the display of the view, click the Home button.