| Main Window (left): | |
| a) | name of a function, routine, method, ... |
| b) | percentage of the overall time consumed by a) (including all sub-routines) |
| c) | time consumed by function a) (including all sub-routines) |
| d) | time consumed by the sub-routines of a)only (including their sub-sub-routines...) |
| e) | number of (non-recursive) calls to function a) (eventually: "+ recursive calls" ) |
| f) | name of a caller of function a) (click on the name to go to the section for this caller) |
| g) | time consumed by function a) when called by f) |
| h) | time consumed by sub-routines of a) when a) was called by f) |
| i) | number of calls to a)by f) / total number of calls to a) |
| j) | name of a sub-routine called by a)(click on the name to go to the section for this sub-routine) |
| k) | percentage of the time c) consumed by j) |
| l) | time consumed by j) when called from a) |
| m) | time consumed by the sub-routines of j) when j) was called by a) |
| n) | number of calls to j) by a) / total number of calls to j) |
|
Notice: |
|
| profile.tcl shows the "call-graph profile" only (not the "flat profile") the column "time" shows the time consumed by a function including all its sub-routines (i.e. columns self+children of the ascii-profile) |
|
|
Fold / Unfold Sections: |
|
| Clicking on the mouse-button on a function name folds / unfolds a section. Follow a link and unfold the section of the target function : click with the right mouse-button on the sub-routines / callers name |
|
|
Colorization of ... |
|
| ... "callers" depends on how often they called a function | |
| ... sub-routines depends on the percentage of time spend by a sub-routine | |
| List of unfolded Functions (right): |
|
| Shows all functions with "unfolded" Sections in the main window (left). Click on a function name to go to that function. Clicking with the right mouse-button folds that section (list entry disappears). You can hide/unhide the whole list by clicking on the |
|
| Compilation for profiling (with -pg option): > cc -pg sourcecode.cpp -o executable |
| Running executable, which creates the file gmon.out: > executable |
| Running gprof to create profile1.txt in ascii format: > gprof executable gmon.out > profile1.txt |
| Starting front-end to display profile1.txt and optionally further profiles > profile.tcl profile1.txt [profile2.txt ...] |
| Alternatively (if your version of wish isn't named "wish", but "wish8.4" or the like) > wish8.4 profile.tcl profile1.txt [profile2.txt ...] |
| Un-Zip: > gunzip profiler.tar.gz |
| "Install" (preferably in a directory containing no "profiler" subdirectory - see below): > tar -xf profiler.tar |
| A directory "profiler" will be created containing these files: -rw-r--r-- 1 pat users 17869 Mar 3 21:10 GPL_LICENSE -rw-r--r-- 1 pat users 56 Mar 3 21:49 fold.gif -rw-r--r-- 1 pat users 44 Mar 4 09:44 hline.gif -rwxr-xr-x 1 pat users 23613 Mar 5 18:53 profile.tcl -rw-r--r-- 1 pat users 58 Mar 3 21:48 unfold.gif |