/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/valgrind.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
 
Memory Debugger:
2
 
    valgrind <application>              
3
 
        --track-origins=yes             Track uninitialized values
4
 
        --leak-check=full
5
 
 
6
 
Othertools:
7
 
    cachegrind:                         Cache simmulator
8
 
    callgrind:                          Tree profiler
9
 
    helgrind:                           Pthread debugger (race conditions,...)
10
 
    massif:                             Heap profiller
11
 
    memcheck:                           Memory debugger
12
 
 
13
 
    iogrind:                            Third party, IO profiller (prealpha)
14
 
    
15
 
    
16
 
 
17
 
Other tools:
18
 
    --collect-jumps=yes                         - callgrind
19
 
    --simulate-cache=yes                        - callgrind, cache behaviour simulation
20
 
    --simulate-hwpref=yes                       - callgrind, prefetch simulation
21
 
    --cache-sim=yes                             - Cachegrind
22
 
    --branch-sim=yes                            - Cachegrind
23
 
    --heap=yes                                  - Massif
24
 
    --stacks=yes                                - Massif
25
 
    --track-lockorders=yes                      - Helgrind
26
 
    --show-conflicts=yes                        - Helgrind
27
 
    --enable-sg-checks=yes                      - Memcheck
28
 
 
29
 
Selecting tool
30
 
    valgrind --tool=<tool_name> <tool_options> app
31
 
 
32
 
 
33
 
Callgrind profilling
34
 
--------------------
35
 
 valgrind --tool=callgrind <application>
36
 
    create callgrind.out.* in working directory
37
 
 
38
 
    callgrind_annotate                          - information
39
 
    callgrind_annotate --tree=both              - in tree form
40
 
        
41
 
    callgrind_control                           - controlling callgrind process
42
 
                                    we may start and stop instrumentation, etc.
43
 
 
44
 
Heap Profilling
45
 
----------------
46
 
    ms_print                                    - readable
47
 
    
 
 
b'\\ No newline at end of file'