Identifying active threads
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.
Prerequisites:
To open the Execution Flow view follow these steps:
- In the Profiling Monitor view, select a resource under a profile project, for example a monitor or an agent.
- Right click, then select Open With > Execution Flow. The
Execution Flow view opens.
- 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.

- You can examine specific parts of the graph by zooming in to a particular area, using the
toolbar button.

Similarly, you can use the
toolbar button to zoom out.
- 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.
Similarly you can use the pop-up menu option
Hide All Repetitions to hide the repetitions in the graph.
Tips
- 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.
Related concepts
Overview of the Java Profiler
Execution flow view and table
Related tasks
Profiling an application
Launching or attaching to a process for profiling
(C) Copyright IBM Corporation 2000, 2008. All Rights Reserved.