/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 Analysis/debugger/malloc/google.txt

  • Committer: Suren A. Chilingaryan
  • Date: 2015-08-21 03:52:00 UTC
  • Revision ID: csa@suren.me-20150821035200-xu1zh22cqlk2omcq
Profiling

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Google Performance Tools
 
2
------------------------
 
3
 Malloc debugger as well as Heap and CPU profillers. Constructs graph to 
 
4
better represent call flow.
 
5
 - Due to the design, you only got the main time consuming functions. The 
 
6
 profilling of servers waking up for a short time to process requests is 
 
7
 not possible.
 
8
 - Crashing on amd64 due to libunwind 0.98.x (0.99 is expected to fix problem
 
9
 in the future)
 
10
 
 
11
Info
 
12
====
 
13
 - Crashing on amd64 due to libunwind 0.98.x (0.99 is expected to fix problem
 
14
 in the future)
 
15
    ./configure --enable-frame-pointers
 
16
    applications and _all_ system libraries should be compiled with 
 
17
    -fno-omit-frame-pointer (yes system libraries as well, otherwise
 
18
    nothing will work)
 
19
 
 
20
 cpu profiler (pretending to support threads)
 
21
    CPUPROFILE=/home/csa/cpu.profile LD_PRELOAD=/usr/lib/libprofiler.so
 
22
 
 
23
 heap usage profiller and memory leak detector
 
24
    HEAPCHECK=normal LD_PRELOAD=/usr/lib/libtcmalloc.so ls
 
25
    HEAPPROFILE=/home/csa/cpu.profile LD_PRELOAD=/usr/lib/libtcmalloc.so ls
 
26
 
 
27
 Visualising
 
28
    pprof --text <application> <profile.file> 
 
29
        * grpahical represntation (--ps --pdf --gv)
 
30
        * supports  valgrind data
 
31
    Format:
 
32
        1) Direct memory use
 
33
        2) Percentage of direct memory usage
 
34
        3) Cummulative sum of second column (i.e. all lines above)
 
35
        4) Memory use by function and all his callees
 
36
        5) Percentage of memory usage of function + callees