--------------------------------------------------------------------------------
Ir
I1mr ILmr Dr
--------------------------------------------------------------------------------
8,821,482
5
5 2,242,702 1,621
5,222,023
4
4 2,276,334
2,649,248
2
2 1,344,810 7,326 1,385
2,521,927
2
2
591,215
2,242,740
2
2 1,046,612
1,496,937
4
4
630,874 9,000 1,400
897,991
51
51
897,831
598,068
1
1
299,034
598,068
0
0
299,034
598,024
4
4
213,580
446,587
1
1
215,973 2,167
341,760
2
2
128,160
320,782
4
4
150,711
298,998
1
1
106,785
149,518
0
0
149,516
149,518
0
0
149,516
95,983
4
4
38,031
85,440
0
0
42,720
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:
D1mr DLmr Dw
D1mw
73 1,794,230
16
12
875,959
0
0
179,398
568
22
448,548
279,388
95
30
62
0
0
149,517
0
0
149,517
35
16
149,506
430
129,948 14,057 13,957 concord.c:add_existing
0
0
128,160
276
0
56,027
0
0
64,071
0
0
1
0
0
1
0
0
34,409 3,152 3,150 concord.c:new_word_node
0
0
21,360
Cachegrind: a cache and branch-prediction profiler
DLmw
file:function
0
0 getc.c:_IO_getc
1
1 concord.c:get_word
.
.
. vg_main.c:strcmp
0
0 concord.c:hash
0
0 ctype.c:tolower
0
0 concord.c:insert
1
1 ???:???
0
0 ../sysdeps/generic/lockfile.c:__flo
0
0 ../sysdeps/generic/lockfile.c:__fun
0
0 vg_clientmalloc.c:malloc
0
0 vg_clientmalloc.c:vg_trap_here_WRAP
53
53 concord.c:init_hash_table
1
1 concord.c:create
0
0 ???:tolower@@GLIBC_2.0
0
0 ???:fgetc@@GLIBC_2.0
0
0 vg_clientmalloc.c:vg_bogus_epilogue
81
Need help?
Do you have a question about the Software and is the answer not in the manual?