/docs/MyDocs

To get this branch, use:
bzr branch http://darksoft.org/webbzr/docs/MyDocs

« back to all changes in this revision

Viewing changes to Development/debugging/profiling/google.txt

  • Committer: Suren A. Chilingaryan
  • Date: 2009-04-09 03:21:08 UTC
  • Revision ID: csa@dside.dyndns.org-20090409032108-w4edamdh4adrgdu3
import

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 - Crashing on amd64 due to libunwind 0.98.x (0.99 is expected to fix problem
 
2
 in the future)
 
3
    ./configure --enable-frame-pointers
 
4
    applications and _all_ system libraries should be compiled with 
 
5
    -fno-omit-frame-pointer (yes system libraries as well, otherwise
 
6
    nothing will work)
 
7
 
 
8
 cpu profiler (pretending to support threads)
 
9
    CPUPROFILE=/home/csa/cpu.profile LD_PRELOAD=/usr/lib/libprofiler.so
 
10
 
 
11
 heap usage profiller and memory leak detector
 
12
    HEAPCHECK=normal LD_PRELOAD=/usr/lib/libtcmalloc.so ls
 
13
    HEAPPROFILE=/home/csa/cpu.profile LD_PRELOAD=/usr/lib/libtcmalloc.so ls
 
14
 
 
15
 Visualising
 
16
    pprof --text <application> <profile.file> 
 
17
        * grpahical represntation (--ps --pdf --gv)
 
18
        * supports  valgrind data
 
19
    Format:
 
20
        1) Direct memory use
 
21
        2) Percentage of direct memory usage
 
22
        3) Cummulative sum of second column (i.e. all lines above)
 
23
        4) Memory use by function and all his callees
 
24
        5) Percentage of memory usage of function + callees