Skip to content

Image Info

Cristian Tepus edited this page Dec 28, 2023 · 3 revisions

A visual utility used to display static function callgraph, memory usage and memory content over a provided build artifact (i.e. executable, library, object file).

Additionally, if the build stage is set to provide stack usage information (so .su files generated by -fstack-usage option in gcc compiler), the generated callgraph will also display local and global consumed stack plus source location of the symbol from graph. You have following options to load a file into Image Info view:

  1. Choose a project which already has a built configuration target and use "Load Current Build Artifact Selection" button from this view's toolbar.

File Explorer

  1. Choose an existing build artifact file (executable, object or library file) and choose "Image Info" option from its context menu.

File Explorer

Once loaded, the view will display two trees: Callgraph and Memory:

Image info view

Callgraph

Callgraph displays all the function calls in a tree, also displaying additional information:

  • Run address
  • Depth of call
  • Static or dynamic allocation
  • Local and global cost (stack allocation)

If a recursive call is identified, the callgraph only displays the second occurrence and marks it with "Recursive" message:

Recursive Call

For exploring convenience, the exception handlers are grouped in a separate virtual node.

Exception handlers

Memory

Memory tree displays the identified memories (only for executable, not for object files) with several information:

  • Start and end addresses
  • Size of the memory
  • Occupied and free space plus usage information as %

Each memory contains sections and then symbols, all of them containing various information like:

  • Run address
  • Load address (only available if map file is available in project)
  • Occupied size

Note: Some difference might appear comparing sum of all symbols in a section and the size of used space in that section. This is because simply summing symbols is not taking into account padding and alignments.

File

File tree displays the symbols organized by source files.

Toolbar options

Once an image is loaded into this view, you have several other options in toolbar for:

  • Refresh. Note that refresh operation will consider a built image from the last file selection.

Refresh

  • Sort symbols by name.

Sort by name

  • For Callgraph only: sort ascending or descending by local or global stack consumption (cost).

Sort by cost

  • For Memory and File only: sort ascending or descending by symbol code size.

Sort by size

  • For C++ only: set to display symbols as mangled or demangled form.

Demangled

  • Option to strip or to keep assembly symbols from Callgraph. By default, assembly symbols are removed from Callgraph. The symbols are considered as "assembly" if the user is using -fstack-usage to generate stack usage information for the symbols from C/C++ sources, but some symbols from disassembled application are not found in this generated stack usage information.

Asm stripping

  • Collapse all the expanded nodes.

Collapse

Exploring the source code

Where available, each symbol provides link to its definition in the source code. Source code link availability is marked by a bullet icon near each symbol, and also the source file path is indicated when hovering the mouse over the symbol line.

Source info

Additionally, when clicking on the symbol with associated source file, the source file is open and the symbol definition goes on editor focus.

Source code

Troubleshooting

Missing file source or/and stack cost information: source code and stack cost information rely on the stack usage files generated by -fstack-usage compiler option. Most of the default created projects are providing this option by default. Still, missing this compile option will lead to empty File tree section and no source file information for the symbols.

Empty Callgraph tree: the callgraph is generated based on arm-none-eabi-objdump tool. Check its presence in the /bin directory of the toolchain associated with your project.

home

Clone this wiki locally