Identifying the methods behind thread bottlenecks
After you have identified a thread bottleneck, use the Thread View, the UML2 Object Interactions view, and the Profiling Monitor to identify the methods implicated in the bottleneck.
Prerequisite: To use the UML2 Object Interactions view, select Collect UML2 Sequence Diagram object interaction data in the Thread Analysis profiling type when you collect data. Refer to Collecting thread data.
To see what methods were called at the time of a bottleneck:
- Open the UML2 Object Interactions view: From the Thread View drop-down menu, select Open With UML2 Object Interactions.
- Make sure that the Profiling Monitor and the Thread View are displayed, as well as the UML2 Object Interactions view.
- In the Thread View’s list of threads, select the thread you want to investigate.
- In the Thread View display of thread timelines, position the Current Time indicator over the arrow for a call that you want to investigate. The Current Time indicator is a vertical line positioned, by default, at the left edge of the Thread View graph. To move the Current Time indicator, drag it with the mouse, or click in the Time Window. This action has the following results:
- It synchronizes the UML2 Object Interactions view so that the first visible message is the call selected by the Current Time indicator.
- It expands the Profiling Monitor Call Stack node to display the call indicated by the Thread View Current Time indicator. A call is indicated in the Profiling Monitor by the call indicator icon
. Note that you have to expand the Thread Analysis node in the Profiling Monitor to examine the call stack.
- It changes the current time indicated for the Call Stack node from 0 seconds (which marks the beginning of the run) to the time (in micro-seconds from the beginning of the run) that the call was made.
- Identify the calling method by referring to the UML2 Object Interactions view or the Profiling Monitor Call Stack entry.
The following topic provides additional information about using these views together:
Using the Thread View, UML2 Object Interactions view, and the Profiling Monitor together
The Thread View, UML2 Object Interactions view, and the Call Stack node in the Profiling Monitor provide complementary information. Changing the focus in the Thread View or the UML2 Object Interactions view synchronizes all of them.
Parent topic
Detecting thread bottlenecks
Related tasks
Identifying thread bottlenecks
Related reference
The Thread View