Everything
 

Call Graph panel


This panel is used to display the tree-structured chart (call graph) that indicates calling relationships between functions.

The following types of function/variable are displayed in this panel.

-

Global function

-

Static function

-

Member function (only when C++ source files are subject to analysis) [CC-RX]

-

Global variable

-

Static variable inside a file

-

Static variable inside a function

-

Class variable (only when C++ source files are subject to analysis) [CC-RX]

 

Note, however, that the function information and variable information in the files not to be analyzed is not displayed in this panel (see "1.1.1 What is analyzed").

See "2.4 Display Calling Relationships between Functions (Call Graph)" for details on how to display the call graph.

Cautions 1.

If the debug tool to use does not support the trace function, or if the debug tool's trace function is not enabled, then the Dynamic analysis information (e.g. the execution count/read count/write count) in the call graph cannot be displayed.
For the dynamic analysis information, also see the caution of "(a) Trace function".

Cautions 2.

[CC-RX]
When C++ source files are subject to analysis, also see "3.6 When CC-RX (C++ Source Files) Is Used".

Remarks 1.

A function/variable whose source file does not exist in the project can be displayed in the call graph if the [Display the function/variable without definition at Call Graph panel] property in the [General] category on the [Settings] tab of the Property panel is set to [Yes].

Remarks 2.

This panel can be zoomed in and out (10 to 109 %) by in the Panel control area, or by moving the mouse wheel forward or backward while holding down the [Ctrl] key.

Figure A.16

Call Graph Panel (Whole View)

 

The following items are explained here.

[How to open]

-

On the toolbar in the Main window, click the button.

-

From the [View] menu, select [Program Analyzer] >> [Call Graph].

[Description of each area]

(1)

Panel control area

 

Toggles whether scrolling of content is enabled by dragging the panel directly. By default, scrolling is disabled.

Note that if scrolling is enabled, then the shape of the mouse cursor will change, and a function/variable will be neither highlighted (shown in selected state) nor reflected in the [Target Function Name] combo box even if clicking on a Function box/Variable box with mouse. There will also not be a Pop-up display with information about the function.

 

Changes the call graph's zoom ratio. A number between 10 and 109 can be selected (by default, 100 is specified).

You can also change the zoom by rotating the mouse wheel forward or backward while pressing the [Ctrl] key.

 

Changes the call graph's zoom ratio. Each click of one of the buttons decrements/increments the value of the zoom slider by 1.

 

Automatically changes the call graph's zoom ratio. The call graph is enlarged or shrunk in accordance with the size of the panel, so that the entire call graph can be displayed.

 

Resets the zoom ratio of the call graph to the default value of 100.

 

 

[Parent Function Name] combo box

(Left combo box)

Selects the parent function to target for display in the call graph (it will be at the top of the call graph) from the drop-down listNote 1. By default, the first function to appear named "main"/"reset"/"start"Note 2 or containing such word is specified as the parent function (if there is no corresponding function, it will be empty).

 

 

[Target Function Name] combo box

(Right combo box)

Selects the function to highlight (show in selected state) on the call graph from the following drop-down list.

-

If the [Parent Function Name] combo box is empty
Whole view: The names of all functions in the program
Details view: The names of all functions currently being shown

-

If a parent function is specified with the [Parent Function Name] combo box
Whole view: The names of functions called by that parent function
(including child and grandchild functions)
Details view: The names of all functions currently being shown

When a function box is clicked in the call graph, the function is highlighted (unless scrolling via the mouse dragging is enabled by the button), and then the function's name is also reflected in this combo box.

 

 

 

 

 

 

Switches to the details view that displays the parent functions and child functions of the function currently being selected (specified with the [Target Function Name] combo box) (toggle).

Note that this item is disabled during execution of a program.

Notes 1.

[RH850]
If the selected microcontroller version supports multi-core, you can select "PMn". In this case, the call graph will only be displayed for the functions executed in the selected PMn/PEn.

Notes 2.

The function name differs with the selected microcontroller as follows:

-

[RH850][RL78]: main

-

[RX]: reset

(2)

Call graph area

This area displays a call graph indicating calling relationships between functions that have been acquired from the cross reference information.

A call graph has the following two view modes that can be toggled by clicking the button.

 

-

Whole view (default)

By default, the first function to appear named "main"/"reset"/"start"Note 1 or containing such word is considered to be the parent function, and that function is placed on the left edge of the call graph (the corresponding parent function name will be displayed in the [Parent Function Name] combo box). If there is no corresponding function name, then the functions in the program that are not called by any other functions (reference count = 0) will be considered to be parent functions, and they will be placed on the leftmost edge (the [Parent Function Name] combo box will be empty).

Next, the child functions, grandchild functions, and so on will be placed on the call graph, from left to right (they will be arranged from top to bottom, with the functions to appear first shown topmost).

If an arbitrary parent function is specified in the [Parent Function Name] combo boxNote 2, then only the functions called by that function will appear in the call graph. If the combo box is empty, then all functions in the program will appear in the call graph.

Notes 1.

The function name differs with the selected microcontroller as follows:

-

[RH850][RL78]: main

-

[RX]: reset

Notes 2.

[RH850]
If the selected microcontroller version supports multi-core and "PMn" is selected in the [Parent Function Name] combo box, the call graph will only be displayed for the functions executed in the selected PMn/PEn.

 

-

Details view

The parent functions and child functions of the function currently being specified with the [Target Function Name] combo box are displayed.

The parent functions, the target function and the child functions are placed on the call graph, from left to right (they will be arranged from top to bottom, with the functions to appear first shown topmost).

Furthermore, if global variables, static variables inside a file or static variables inside a function accessed from the target function exist, the variables also is placed immediately below the target function, as variable boxes (when the multiple variables exist, they will be arranged from top to bottom, with the variables to appear first shown topmost).

Remark

Any one of the following events will cause that the call graph is switched to whole view mode.

-

The value of the [Parent Function Name] combo box has been changed (including the result of a build/rebuild in the build tool).

-

A clean has been executed in the build tool.

Figure A.17

Call Graph Panel (Details View)

 

The composition of the call graph is as follows:

Figure A.18

Composition of Call Graph

(a)

Function box

The function is displayed in a box format.

The following information is displayed in a function box.

Figure A.19

Information of Function Box

Function name

Indicates the name of the target functionNote.

Definition

Indicates the location at which the target function is defined with "File name(Line number)".

Note, however, that if the definition information does not exist, then this will display "(No Definition)".

Attribute

Indicates the attribute of the target function.

-

Static function: <static>

-

Template function: <template> [CC-RX]

-

Virtual function: <virtual> [CC-RX]

-

Pure virtual function: <abstract> [CC-RX]

If the attribute other than the above, nothing is displayed in this area.

Condition

The current state of the target function is shown in the following background colors.

-

Light blue: Not executed

-

Purple: Executed

PM Information [RH850]

If the selected microcontroller version supports multi-core, PE in which the target function is assigned is shown in the following shadow colors.

-

Gray: Common

-

Orange: PM0/PE0, PM4/PE4

-

Red: PM1/PE1

-

Green: PM2/PE2

-

Blue: PM3/PE3

Note

[CC-RX]
If the target function is a overloaded function or a template function, then the argument types of the function are also displayed in parentheses "( )".
If the target function is a const member function or volatile member function, then "const" or "volatile" is displayed immediately after the function name.

Remark

By double-clicking a function box, you can jump to the location of the source text where the function is defined (see "2.7 Jump to Defined Location").
Note, however, that this function cannot be used while scrolling via the mouse dragging is being enabled by the button. In this case, select the target function with the [Target Function Name] combo box, then select [Jump to Source] from the context menu.

(b)

Variable box

In the details view mode, a global variable, a static variable inside a file or a static variable inside a function accessed from the target function is displayed in a box format.

The following information is displayed in a variable box.

Figure A.20

Information of Variable Box

Variable name

Indicates the name of the target variable.

If the target variable is a static variable inside a function, then this will be displayed in the format of "Variable name#Function name".

Definition

Indicates the location at which the target variable is defined with "File name(Line number)".

Note, however, that if the definition information does not exist, then this will display "(No Definition)".

Attribute

Indicates the attribute of the target variable.

-

Static variable: <static>

-

Static variable inside a function: <static local>

 

If the attribute other than the above, nothing is displayed in this area.

Reference count

Indicates the number of times of static references.

Read count, Write count

Indicates the number of times dynamic references (R: read accesses, W: write accesses) have been made.

Note that this information appears only when the trace data exist.

This information is the cumulative value for each program execution when the [Accumulate result of analysis] property in the [General] category on the [Settings] tab of the Property panel is set to [Yes].

Condition

The current state of the target function is shown in the following background colors.

-

Green: Not referenced

-

Red purple: Referenced

PM Information [RH850]

If the selected microcontroller version supports multi-core, PE in which the target variable is assigned is shown in the following shadow colors.

-

Gray: Common

-

Orange: PM0/PE0, PM4/PE4

-

Red: PM1/PE1

-

Green: PM2/PE2

-

Blue: PM3/PE3

Remark

By double-clicking a variable box, you can jump to the location of the source text where the variable is defined (see "2.7 Jump to Defined Location").
Note, however, that this function cannot be used while scrolling via the mouse dragging is being enabled by the button. In this case, disable the scroll function temporarily, then double click the target variable.

(c)

Connection line

If a given function is called statically by another function, then the function boxes of the two functions will be shown linked by a connection line. Connection lines are only displayed for static function calls. Connection lines are not displayed for dynamic function calls.

The following information is displayed by each connection line.

Figure A.21

Information of Connection Line

Reference count

Indicates the number of times of static calls.

Execution count

Indicates the number of times dynamic calls have been made, in parentheses "( )".

Note that this information appears only when the trace data exist.

This information is the cumulative value for each program execution when the [Accumulate result of analysis] property in the [General] category on the [Settings] tab of the Property panel is set to [Yes].

Recursive call

A connection line and reference count is displayed as follows when a function calls itself.

 

Circular call

As an example, say that there are functions A, B, and C. If A calls B, which calls C, which then calls A (A -> B -> C -> A), then although connection lines will be displayed for the calls of A to B and B to C, no connection line will be shown for the call of C to A. Instead, the following line segment will only be shown, to indicate a circular call.

You can check information about functions in a circular call via the Pop-up display.

 

Remark

If there are no static function calls but there are dynamic function calls (e.g. if function calls are only made using function pointers), then this information can be confirmed in the Pop-up display.

(d)

Pop-up display

When the mouse cursor is hovered over a function box/variable box, information about that function/variable appears in a pop-up.

The display format is as follows:

Caution

This function cannot be used while scrolling via the mouse dragging is being enabled by the button.

-

Function box

Function name: Function name

Location: File name(Line number)

@absolute path of the file

Recursive call count: Reference count(Execution: Execution count)

Circular call count

Function name: Reference count(Execution: Execution count)

...

Dynamic call count

Function name: Count

...

Function name

Indicates the name of the target functionNote.

Location

Indicates the location at which the target function is defined.

Note, however, that if the definition information does not exist, then this will display "(No Definition)".

Recursive call count

This item is displayed only if the target function is a recursive call.

Reference count: Number of recursive calls made

Execution count: Number of executions (only if there is trace data)

Circular call count

This item is displayed only if there are circular function calls from the target function. If there are multiple target functions, that at most 4 will be listed.

Function name: Name of function in circular call

Reference count: Number of circular calls made

Execution count: Number of executions (only if there is trace data)

Dynamic call count

This item is displayed only if there are only dynamic function calls, and no static function calls. If there are multiple target functions, that at most 4 will be listed.

Function name: Name of dynamic call function

Count: Number of executions

Note

[CC-RX]

-

When the target function is a global function or static function:
If the target function belongs to a namespace (except for a global namespace/anonymous namespace), then this will be displayed in the format of "Namespace name::Function name".
Moreover, if the target function is a overloaded function or a template function, then this will be followed by the argument types of the function in parentheses "( )".

-

When the target function is a member function:
If the target function belongs to a namespace (except for a global namespace/anonymous namespace), then this will be displayed in the format of "Namespace name::Class name::Function name". Otherwise this will be displayed in the format of "Class name::Function name".
Moreover, if the target function is a overloaded function or a template function, then Function name will be followed by the argument types of the function in parentheses "( )".
If the target function is a const member function or volatile member function, then "const" or "volatile" is displayed immediately after the function name.

Remark

The cumulative value for each program execution is displayed as the execution count when the [Accumulate result of analysis] property in the [General] category on the [Settings] tab of the Property panel is set to [Yes].

-

Variable box

Variable name: Variable name

Location: File name(Line number)

@absolute path of the file

Variable name

Indicates the name of the target variableNote.

If the target variable is a static variable inside a function, then this will be displayed in the format of "Function name#Variable name".

Location

Indicates the location at which the target variable is defined.

Note, however, that if the definition information does not exist, then this will display "(No Definition)".

Note

[CC-RX]

-

When the target variable is a global variable or static variable inside a file:
If the target variable belongs to a namespace (except for a global namespace/anonymous namespace), then this will be displayed in the format of "Namespace name::Variable name".

-

When the target variable is a class variable:
If the target variable belongs to a namespace (except for a global namespace/anonymous namespace), then this will be displayed in the format of "Namespace name::Class name::Variable name". Otherwise this will be displayed in the format of "Class name::Variable name".

-

When the target variable is a static variable inside a function:
If the target variable belongs to a namespace (except for a global namespace/anonymous namespace), then this will be displayed in the format of "Namespace name::Function name#Variable name". Otherwise this will be displayed in the format of "Function name#Variable name".

-

If the target variable is a class variable, then this will be displayed in the format of "Class name::Function name#Variable name".

[Toolbar]

The toolbar provides the following items and functions.

 

Acquires the latest data from the debug tool, and updates the contents of this panel.

Note that this item is disabled during execution of a program.

 

Displays the latest information automatically by acquiring the information each time program execution stops.

Note that this item is disabled if the [Refresh at program stop] property in the [General] category on the [Settings] tab of the Property panel is set to other than [Specify Individually] (this button is locked in accordance with the setting on the Property panel).

 

Opens the Call Graph Search dialog box to search for a function/variable existing on this panel.

[[File] menu (Call Graph panel-dedicated items)]

The [File] menu for this panel provides the following items and functions.

Save Call Graph Data

Overwrites the contents of this panel to the previously saved file (see "2.14 Save Analysis Information").

Note that when the file has never been saved or the file is write disabled, the same operation is applied as the selection in [Save Call Graph Data As...].

Save Call Graph Data As...

Opens the Save As dialog box to newly save the contents of this panel to the specified text file (see "2.14 Save Analysis Information").

[[Edit] menu (Call Graph panel-dedicated items)]

The [Edit] menu for this panel provides the following items and functions.

Find...

Opens the Call Graph Search dialog box to search for a function/variable currently existing on this panel.

[Context menu]

The context menu displayed by right-clicking on this panel provides the following items and functions.

Jump to Source

Opens the Editor panel and displays the source file in which the function/variable currently being selected is defined (see "2.7 Jump to Defined Location").

Jump to Disassemble

Opens the Disassemble panel (Disassemble1) and displays the disassemble data corresponding to the start address of the function/variable currently being selected (see "2.7 Jump to Defined Location").

Note that this item is disabled while disconnecting from the debug tool.

Jump to Memory

Opens the Memory panel (Memory1) and displays the memory list corresponding to the start address of the function/variable currently being selected (see "2.7 Jump to Defined Location").

Note that this item is disabled while disconnecting from the debug tool.

Jump to Function/Variable List

Opens the Function List panel/Variable List panel and selects the function/variable currently being selected.

Detail View

Switches to the details view that displays the parent functions and child functions of the function currently being selected (specified with the [Target Function Name] combo box).

Note that this item is disabled during execution of a program.