The Call Graph View
ARM DUI 0482K
Copyright © 2010-2012 ARM. All rights reserved.
9-2
ID120712
Non-Confidential
9.1
Call Graph view basics
The Call Graph view provides you with a visual representation of your code hierarchy, laying
out each function according to where it is called and using arrows to connect calling functions.
The direction of the arrow indicates which function was the calling function. An arrow pointing
to a function tells you that function is the callee and the function from which the line originates
is the calling function. This topic describes the layout of the call graph in more depth, providing
a quick overview of how the hierarchy is built and what the bullets to the right and left of the
functions represent.
9.1.1
How the hierarchy is built
The hierarchy of functions, as presented in the Call Graph view, is built based on the call chains
sampled during execution.
Note
The Call Graph view depends on call stack unwinding, an option you can set using the Capture
Options dialog box. For more information on call stack unwinding, see
The originating function is placed in the far left column and functions it calls are placed in the
column to its right. Functions that these functions call are placed in a column to the right of that
and so on down the line, until all of the functions have been placed. There is a caveat to this
placing behavior. If a function is called at multiple levels of the hierarchy, it is placed as far left
as possible in the Call Graph view.
To illustrate, if the function
main
calls function
a
which in turn calls function
b
, it looks like this:
Figure 9-1 A Simple Call Hierarchy
If, in addition to function
a
,
main
also calls function
b
, function
b
is put in a higher place in the
hierarchy, nearer to main, it might look like this:
Figure 9-2 A Call Hierarchy with Multiple Call
The Call Graph view presents a simple call hierarchy, but real-world algorithms describe
hierarchies far more complex than those shown in the figures. Rather than present the Call
Graph view with all of these connections visually represented as a spider web of call arrows, the
Call Graph view uses a simple method to determine whether or not to draw a call line.
9.1.2
Caller and callee bullets
In cases where the calling function is in the same column or in a column to the left or right of
the called function, a call arrow is drawn from the caller to the callee. If, however, the called
function appears in a column more than one column to the left of the calling function, a bullet
is added to the left of the calling function and to the right of the called function. The number
contained in the bullet represents how many calling or called functions the bullet represents.