/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/profilers.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
 
Toolset
2
 
=======
3
 
 Function/Tree Profiller: perf, valgrind/kcachegrind(slow), google-perftools (low precision)
4
 
 Hardware Assisted Profiller: oprofile, sysprof, CodeXL
5
 
 Heap Profiller: valgrind/kcachegrind(slow), Google PerfTools (low precision)
6
 
 Memory Fragmentation: TotalView Memoryscape
7
 
 Memory Leak Detector: TotalView Memoryscape, valgrind (free), Purify (finds lot)
8
 
 Debugger: Slickedit + gdb, TotalView + ReplayEngine (!?)
9
 
 
10
 
List
11
 
====
12
 
 - oprofile: Profiler based on the hardware counters.
13
 
 - sysprof: Simple GUI to oprofile
14
 
 - dev-util/perf: kernel profiler (using system tap)
15
 
 - latencytop: process waits on CPU (modules, symbols, system calls)
16
 
 - powertop: power usage / wake-ups per second
17
 
 
18
 
 
19
 
Standard GNU profiler (gprof, gcov)
20
 
---------------------
21
 
 GNU profiller have problems with multithreaded applications and is not able
22
 
 to track into the dynamicaly loaded (dlopen) shared libraries. Moreover,
23
 
 while gprof will just ignore such libraries, gcov will fail all calls
24
 
 to dlopen.
25
 
 
26
 
Valgrind / callgrind
27
 
--------------------
28
 
 Open source memory leak detector and profiller. Very powerful, it is able
29
 
 to profile CPU and HEAP, simullate cache and branching behaviour. There is
30
 
 even alpha version of I/O profiller available. However, it's extremely
31
 
 slow.
32
 
 
33
 
 * kcahcegrind  - provides graphical tree-style profiller (very convinient)
34
 
 * alleyoop     - Gnome GUI to valgrind memcheck and helgrind. Do not provide
35
 
                profilling analysis.
36
 
 
37
 
Google Performance Tools
38
 
------------------------
39
 
 Malloc debugger as well as Heap and CPU profillers. Constructs graph to 
40
 
better represent call flow.
41
 
 
42
 
 - Due to the design, you only got the main time consuming functions. The 
43
 
 profilling of servers waking up for a short time to process requests is 
44
 
 not possible.
45
 
 - Crashing on amd64 due to libunwind 0.98.x (0.99 is expected to fix problem
46
 
 in the future)
47
 
 
48
 
AMD CodeXML
49
 
-----------
50
 
 The focuse is profilling of OpenCL applications. But it works fine with CPU
51
 
 profilling using oprofile counters.
52
 
 
53
 
TotalView MemoryScape & Debugger (with ReplayEngine) [commercial]
54
 
--------------------------------
55
 
 - Finding memory leaks and potential problems in memory
56
 
 fragmentation
57
 
 - Debugger provides step-back functionality by recording states
58
 
 of execution
59
 
 - Supports parallel debugging (MPI, ...), not tests
60
 
 
61
 
 Sources should be compiled with -g -gdwarf-2 -g3 -DDEBUG_GDB
62
 
 
63
 
IBM Rational PurifyPlus [commercial, limited(very) evolution]
64
 
-----------------------
65
 
 Rational suite do not require kernel support consist of 3 tools: 
66
 
    purify - finds problems in code
67
 
    purecov - coverage tasting
68
 
    quantify - performance
69
 
 
70
 
 - IBM only supports RHEL and SuSE Enterprise. Other systems are unsupported.
71
 
 + However, it's pretty well running in VM with scientific Linux 
72
 
 - Evalution license renders some limitations. However, test run on opc-server
73
 
 shown a lot of found errors. No precise details because of evaluation, but 
74
 
 looks comporable to valgrind but much faster.
75
 
 
76
 
Intel VTune [commercial]
77
 
-----------
78
 
 - Intel profiler. Depends on ugly implementation of DCOM to Linux and for that
79
 
 reasons is working on very limited number of platforms. I was able to set
80
 
 on Gentoo and some tools even executed(terribly slow), hower the profiling 
81
 
 always complained and failed.
82
 
 - Depending on hardware counters it is not working in VM.
83
 
 - Expected to be counterpart of oprofile (plus some graphics)
84
 
 - Basicaly console tools
85
 
 - No eclipse integration  on 64bit platform
86
 
 
87
 
Insure++ [commercial, not available]
88
 
--------
89
 
 Advanced tool to find memory and other problems in code
90
 
 
91
 
Other Tools
92
 
===========
93
 
 * pmr - measures pipe bandwidth
94
 
 * pintool - Pin is a tool for the dynamic instrumentation of programs: it may
95
 
 inject arbitrary code (written in C or C++) at arbitrary places in the 
96
 
 executable. Pin adds the code dynamically while the executable is running. 
97
 
 This also makes it possible to attach Pin to an already running process.
98
 
 
99
 
 
100