Cachegrind: a cache and branch-prediction profiler
--------------------------------------------------------------------------------
Ir
I1mr ILmr Dr
D1mr
DLmr
Dw
D1mw
DLmw
file:function
--------------------------------------------------------------------------------
8,821,482
5
5 2,242,702 1,621
73 1,794,230
0
0
getc.c:_IO_getc
5,222,023
4
4 2,276,334
16
12
875,959
1
1
concord.c:get_word
2,649,248
2
2 1,344,810 7,326 1,385
.
.
.
vg_main.c:strcmp
2,521,927
2
2
591,215
0
0
179,398
0
0
concord.c:hash
2,242,740
2
2 1,046,612
568
22
448,548
0
0
ctype.c:tolower
1,496,937
4
4
630,874 9,000 1,400
279,388
0
0
concord.c:insert
897,991
51
51
897,831
95
30
62
1
1
???:???
598,068
1
1
299,034
0
0
149,517
0
0
../sysdeps/generic/lockfile.c:__flockfile
598,068
0
0
299,034
0
0
149,517
0
0
../sysdeps/generic/lockfile.c:__funlockfile
598,024
4
4
213,580
35
16
149,506
0
0
vg_clientmalloc.c:malloc
446,587
1
1
215,973 2,167
430
129,948 14,057 13,957
concord.c:add_existing
341,760
2
2
128,160
0
0
128,160
0
0
vg_clientmalloc.c:vg_trap_here_WRAPPER
320,782
4
4
150,711
276
0
56,027
53
53
concord.c:init_hash_table
298,998
1
1
106,785
0
0
64,071
1
1
concord.c:create
149,518
0
0
149,516
0
0
1
0
0
???:tolower@@GLIBC_2.0
149,518
0
0
149,516
0
0
1
0
0
???:fgetc@@GLIBC_2.0
95,983
4
4
38,031
0
0
34,409
3,152
3,150
concord.c:new_word_node
85,440
0
0
42,720
0
0
21,360
0
0
vg_clientmalloc.c:vg_bogus_epilogue
Each function is identified by a
file_name:function_name
pair. If a column contains only a dot it means the
function never performs that event (e.g. the third row shows that
strcmp()
contains no instructions that write to
memory). The name
???
is used if the the file name and/or function name could not be determined from debugging
information. If most of the entries have the form
???:???
the program probably wasn’t compiled with
-g
.
It is worth noting that functions will come both from the profiled program (e.g.
concord.c
) and from libraries (e.g.
getc.c
)
5.2.6. Line-by-line Counts
There are two ways to annotate source files -- by specifying them manually as arguments to cg_annotate, or with the
--auto=yes
option. For example, the output from running
cg_annotate <filename> concord.c
for our
example produces the same output as above followed by an annotated version of
concord.c
, a section of which
looks like:
81
Содержание Software
Страница 176: ...Valgrind FAQ Release 3 8 0 10 August 2012 Copyright 2000 2012 Valgrind Developers Email valgrind valgrind org ...
Страница 177: ...Valgrind FAQ Table of Contents Valgrind Frequently Asked Questions 1 ii ...
Страница 302: ...README mips based on newer GCC versions if possible 95 ...
Страница 303: ...GNU Licenses ...
Страница 304: ...GNU Licenses Table of Contents 1 The GNU General Public License 1 2 The GNU Free Documentation License 8 ii ...