-
-
Notifications
You must be signed in to change notification settings - Fork 45
/
README
108 lines (74 loc) · 3.38 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
KCachegrind / QCachegrind
-========================
{K,Q}Cachegrind is a KDE/Qt GUI to visualize profiling data.
It's mainly used as visualization frontend for data measured
by Cachegrind/Callgrind tools from the Valgrind package, but
there are converters for other measurement tools available.
Features
* direct support for profiles generated by Cachegrind/Callgrind
* support for arbitrary event types and derived event types
* sorted function list, with grouping according to ELF object/source
file/symbol namespace (such as C++ classes)
* correct handling of recursive cycles (similar to GProf)
* various visualization views for a selected function, such as
- treemap in caller/callee direction
- call graph around function
- source & assembly annotation
Hmm. What is stuff good for?
----------------------------
Any work in improving the performance of a program should be
started with measuring the performance characteristics of the
optimized binary, using representative input data. This process
is called "Profiling". Any other way for performance optimization
usually just wastes developer time.
Profile measurements show whether optimization is needed at all,
and what improvement can be expected. Further, it pinpoint at
functions and source lines where most time is spent, i.e. where an
improvement has most influence on allover runtime.
{K,Q}Cachegrind visualizes profile measurement data. Example of an
easy to use profile measurement tool (no source modifications and
recompilation is required, as well as no root access) are the
cache simulators Cachegrind and Callgrind from the Valgrind toolset.
While {K,Q}Cachegrind directly supports the formats of these
profiling tools, converters are available to allow to import data
from other profiling tools, too.
Compilation and Installation
-===========================
QCachegrind
-----------
Requirements:
* Qt5.x (x >=2) (earlier versions not tested)
* Any platform supported by Qt (Linux, Windows, Mac OS X, ...)
Compilation (from base directory):
qmake; make
To not build in the source directories, do:
mkdir build; cd build; qmake ../qcg.pro; make
The build includes the command line tool "cgview".
Copy the resulting "qcachegrind" binary from the build directory into
your $PATH. For better desktop integration, it should be enough to
copy the .desktop file and icons into standard places, such as:
sudo install -m 755 qcachegrind/qcachegrind /usr/local/bin
sudo install -m 644 qcachegrind/qcachegrind.desktop \
/usr/local/share/applications/
sudo install -m 644 kcachegrind/hi32-app-kcachegrind.png \
/usr/local/share/icons/hicolor/32x32/apps/kcachegrind.png
sudo install -m 644 kcachegrind/hi48-app-kcachegrind.png \
/usr/local/share/icons/hicolor/48x48/apps/kcachegrind.png
KCachegrind
------------
Requirements:
* KF 5.12 or higher: Frameworks development packages (libs & headers)
* CMake
Commands (from base directory):
cmake .; make; make install
To not build in the source directories, do:
mkdir build; cd build; cmake ..; make; make install
The build also compiles the command line tool "cgview" and "qcachegrind",
the Qt-only version of KCachegrind. However, these are not installed.
If you want to also install qcachegrind, see instructions above.
Usage & Help
-===========
{K,Q}Cachegrind has detailed "What's this?" help for
each GUI part. For further help, see quick start pages
on kcachegrind.sf.net
Josef Weidendorfer