30.01.2013 Views

TotalView Users Guide - CI Wiki

TotalView Users Guide - CI Wiki

TotalView Users Guide - CI Wiki

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Displaying Call Graphs<br />

Figure 125: Tools > Call<br />

Graph Dialog Box<br />

a multi-process or multi-threaded program, numbers next to the arrows<br />

indicate which threads have a routine on their call stack.<br />

If you dive on a routine within the call graph, <strong>TotalView</strong> creates a group<br />

called call_graph. This group contains all of the threads that have the routine<br />

you dived on in its call stack. If you look at the Process Window’s Processes<br />

tab, you’ll see that the call_graph set is selected in the scope pulldown.<br />

In addition, the context of the Process Window changes to the first<br />

thread in the set.<br />

As you begin to understand your program, you will see that it has a rhythm<br />

and a dynamic that is reflected in this diagram. As you examine and understand<br />

this structure, you will sometimes see things that don’t look right—<br />

which is a subjective response to how your program is operating. These<br />

places are often where you want to begin looking for problems.<br />

By diving on a routine that doesn’t look right, you’ll isolate the processes<br />

into their own group so that you can find out what is occurring there. Every<br />

time you dive on a routine, <strong>TotalView</strong> overwrites the group. If you want to<br />

preserve the group, use the Groups > Custom Groups command to make a<br />

copy of the group.<br />

Looking at the call graph can also tell you where bottlenecks are occurring.<br />

For example, if one routine is used by many other routines, and that routine<br />

controls a shared resource, this thread might be negatively affecting<br />

performance.<br />

180 Chapter 9: Visualizing Programs and Data

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!