Chapter 9 The Call Graph View; Call Graph View Basics - ARM DS-5 Manual

Hide thumbs Also See for DS-5:
Table of Contents

Advertisement

9.1

Call Graph view basics

9.1.1
How the hierarchy is built
9.1.2
Caller and callee bullets
ARM DUI 0482K
ID120712
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.
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
page
4-3.
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
If, in addition to function
a
hierarchy, nearer to main, it might look like this:
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.
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.
Copyright © 2010-2012 ARM. All rights reserved.
Non-Confidential
calls function
which in turn calls function
main
a
,
also calls function
main
b
Figure 9-2 A Call Hierarchy with Multiple Call
The Call Graph View
Capture options on
, it looks like this:
b
Figure 9-1 A Simple Call Hierarchy
, function
is put in a higher place in the
b
9-2

Advertisement

Table of Contents
loading

Table of Contents