User Guide

Quick Start
Side Panel
Output Window
Graph View
App Toolbar
Launch Dialog
Connect Dialog
Snapshot Toolbar
Full Snapshot
Snapshot Views
Call Tree View
Call Tree Grouping
Memory View
Functions View
Types View
Leaks View
Tools Toolbar
Subtract Snapshots
Rewind Memory
VMem View
Settings Toolbar
Symbol Paths Dialog
MemPro Unix/GCC
PureDev Logo MemPro logo
C++ Memory Profiler

MemPro on Unix/gcc

While the MemPro app only runs on Windows, it can profile an application on virtually any platform or OS. This can be done either by connecting to the app over the network or in offline mode.

On Windows MemPro automatically finds and reads the pdb symbol files. When using gcc it's a bit more complicated. Symbol txt files need to be generated by hand. Use the steps below to generate them.

  1. Compile your application with -g to embed the debug symbols in the exe

  2. Use rm to dump out the symbols to a text file. Open up a terminal and type the following, replacing exe_path and exe_name:

    nm -g --line-numbers --demangle exe_path >exe_name.sym_txt

  3. Copy the sym_txt file to your PC and add its path to the MemPro Symbol Paths


In step 2 the exe_path includes the exe filename, for example
Where MemPro_Test is the name of the executable.

The name of the sym_txt file must match the executable name exactly (apart from the extension of course). In the example above the executable name is MemPro_Test

Putting it all together:
nm -g --line-numbers --demangle /home/slynch/Documents/code/MemPro_Test/MemPro_Test/bin/Debug/MemPro_Test >MemPro_Test.sym_txt
This will create a file MemPro_Text.sym_txt. Copy that file to your PC somewhere that MemPro can find it and you will have symbols.

If you don't want to embed the symbols in your exe (they can get quite big) you can use the split command to split off the symbols into a separate file. You would then run the rm command on this file instead of the exe.

This is an example of what the sym_txt file should look like:

0804bd92 W MemPro::RingBuffer::Range::Range(void*, int) /home/slynch/Documents/code/MemProCpp/MemPro.cpp:799
0804bd8c W MemPro::RingBuffer::Range::Range() /home/slynch/Documents/code/MemProCpp/MemPro.cpp:798
0804bd92 W MemPro::RingBuffer::Range::Range(void*, int) /home/slynch/Documents/code/MemProCpp/MemPro.cpp:799

Each symbol is on a separate line. The first columns is the address (8 chars). The second column is the type (1 char). The third column is the undecorated symbol name. The last column is the file and line number. The first three columns are separated by spaces. The last column is separated by a tab char. See the rm documentation for more details.


The following features will not work when profiling gcc apps:

© Copyright 2011 - 2013 Stewart Lynch