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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
|
## THIS IS AN ANNOTATED VERSION AND NOT SUPPOSED TO BE PARSED
## for more information on the file format see:
## http://kcachegrind.sourceforge.net/html/CallgrindFormat.html
## and
## http://valgrind.org/docs/manual/cg-manual.html#cg-manual.impl-details.file-format
#################
# information about the app that was run
##
version: 1
creator: callgrind-3.6.0.SVN-Debian
pid: 2992
cmd: ls
part: 1
#################
# desc: type: value [Cachegrind]
# This specifies various information for this dump.
# For some types, the semantic is defined, but any description type is allowed.
# Unknown types are ignored.
#
# From cachegrind man:
#
# The contents of the "desc:" lines are printed out at the top of the summary.
# This is a generic way of providing simulation specific information,
# e.g. for giving the cache configuration for cache simulation.
#
# Basically seems to be some information on what caches where found, how long the app ran and
# why the callgrind file was created (app closed, died, callgrind_control --dump, ...)
##
desc: I1 cache:
desc: D1 cache:
desc: L2 cache:
desc: Timerange: Basic block 0 - 300089
desc: Trigger: Program termination
#################
# the positions that get reported, whitespace separated list
##
positions: line
#################
# events that where counted, whitespace separated list
#
# Ir == Instructions
##
events: Ir
#################
# list of total count of events, in this case total cost of Ir events
# Can be used for a progress bar
##
summary: 1434186
#################
# ob: the object the function lives in
# fl: the file where the function lives in
# fn: the function
#
# the (NUM) stuff before that is used for string compression, each string gets only printed once,
# afterwards only (3) or similar will be written
#
# the numbers below are the data columns, starting with the position(s) and then the event(s)
# in our case it's just a pair of pos, event
#
# "If a cost line specifies less event counts than given in the "events" line,
# the rest is assumed to be zero."
#
# "Note that regular cost lines always give self (also called exclusive)
# cost of code at a given position."
#
# generally all this should be shown accumulated for the function.
# if the file exists we might want to show a line-by-line analysis though.
# furthermore note that positions size gets compressed by just wirting the absolute number once
# than using relative values.
##
ob=(3) /lib/i686/cmov/libpthread-2.11.2.so
fl=(131) /build/buildd-eglibc_2.11.2-6-i386-6jE6oF/eglibc-2.11.2/nptl/../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/pthread_rwlock_unlock.S
fn=(782) pthread_rwlock_unlock
33 3
+2 3
+5 3
+3 3
+1 3
+1 3
+6 3
+2 3
+1 3
+4 3
+2 3
+1 3
+1 3
+1 3
+3 3
+1 3
+39 3
+6 3
+2 3
+1 3
+1 3
+1 3
#################
# here we don't have an object and the fn has no symbol, same as above otherwise
##
fl=(44) /build/buildd-eglibc_2.11.2-6-i386-6jE6oF/eglibc-2.11.2/nptl/../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/sem_post.S
fn=(196) 0x00004340
170 11
+1 11
#################
# here we don't have an object, same as above otherwise
#
# also noteworthy is the c{ob,fi,fn} stuff, it shows the object, file, and function of a call
# if they are not given for a calls=... line, they are assumed to be the same as the parent function.
# The calls format is this:
#
# calls=(Call Count) (Destination position)
# (Source position) (Inclusive cost of call)
#
# Another interesting point: The * for the position means: +-0, i.e. same position as before
##
fl=(43) /build/buildd-eglibc_2.11.2-6-i386-6jE6oF/eglibc-2.11.2/nptl/nptl-init.c
fn=(194) __pthread_initialize_minimal
273 4
+14 1
+2 1
-16 1
+16 1
-16 1
+16 1
-2 1
-14 1
cfi=(44)
cfn=(196)
calls=1 170
* 2
* 1
+16 3
cob=(1) /lib/ld-2.11.2.so
cfi=(1) ???
cfn=(198) _dl_sysinfo_int80
calls=1 0
* 2
* 4
+1 3
+1 1
+4 5
+7 1
+6 1
-6 2
+2 1
+4 3
cob=(1)
cfi=(1)
cfn=(198)
calls=1 0
* 2
* 1
+11 2
-2 1
+2 4
cob=(1)
cfi=(1)
cfn=(198)
calls=1 0
* 2
* 1
+1 1
-2 1
+2 1
+1 1
+7 3
+12 2
-8 1
+8 7
cob=(1)
cfi=(1)
cfn=(198)
calls=1 0
* 2
* 1
+1 1
-3 1
+3 1
+1 2
+1 2
+7 3
+4 1
fi=(156) /build/buildd-eglibc_2.11.2-6-i386-6jE6oF/eglibc-2.11.2/nptl/../nptl/sysdeps/pthread/list.h
49 2
fe=(43)
354 1
fi=(156)
49 1
+1 1
+2 1
-1 1
fe=(43)
358 2
+8 2
-2 2
+2 37
+16 1
-14 2
-3 1
+3 3
cfi=(45) /build/buildd-eglibc_2.11.2-6-i386-6jE6oF/eglibc-2.11.2/nptl/../sysdeps/unix/sysv/linux/i386/sigaction.c
cfn=(200) __libc_sigaction
calls=1 59
* 93
+3 1
+3 1
+8 1
-11 1
+1 1
+2 3
cfi=(45)
cfn=(200)
calls=1 59
* 93
+8 1
fi=(157) /build/buildd-eglibc_2.11.2-6-i386-6jE6oF/eglibc-2.11.2/nptl/../sysdeps/unix/sysv/linux/bits/sigset.h
119 2
fe=(43)
382 4
cob=(1)
cfi=(1)
cfn=(198)
calls=1 0
* 2
* 1
+5 3
cob=(1)
cfi=(36) /build/buildd-eglibc_2.11.2-6-i386-6jE6oF/eglibc-2.11.2/elf/dl-tls.c
cfn=(214) _dl_get_tls_static_info
calls=1 -64
* 14
cob=(1)
cfi=(46) /build/buildd-eglibc_2.11.2-6-i386-6jE6oF/eglibc-2.11.2/elf/../sysdeps/i386/dl-trampoline.S
cfn=(208) _dl_runtime_resolve
calls=1 29
* 1958
+3 4
+2 1
+2 2
+6 1
-6 4
+6 3
cob=(4) /lib/i686/cmov/libc-2.11.2.so
cfi=(48) /build/buildd-eglibc_2.11.2-6-i386-6jE6oF/eglibc-2.11.2/resource/../sysdeps/unix/sysv/linux/i386/getrlimit.c
cfn=(220) getrlimit@@GLIBC_2.2
calls=1 41
* 20
cob=(1)
cfi=(46)
cfn=(208)
calls=1 29
* 1634
-1 2
+1 1
-1 2
+5 2
+7 2
cob=(4)
cfi=(50) /build/buildd-eglibc_2.11.2-6-i386-6jE6oF/eglibc-2.11.2/posix/../sysdeps/unix/sysv/linux/x86_64/sysconf.c
cfn=(228) sysconf
calls=1 33
* 50
cob=(1)
cfi=(46)
cfn=(208)
calls=1 29
* 1458
+1 1
+1 1
-1 1
+1 2
+4 4
+1 1
+4 1
cob=(4)
cfi=(55) /build/buildd-eglibc_2.11.2-6-i386-6jE6oF/eglibc-2.11.2/elf/dl-tsd.c
cfn=(242) __libc_dl_error_tsd
calls=1 51
* 10
cob=(1)
cfi=(46)
cfn=(208)
calls=1 29
* 1630
* 3
cob=(1)
cfi=(2) /build/buildd-eglibc_2.11.2-6-i386-6jE6oF/eglibc-2.11.2/elf/rtld.c
cfn=(84) _dl_initial_error_catch_tsd
calls=1 796
* 9
* 2
+1 1
+6 1
+1 1
-7 1
+4 2
+4 1
-3 2
+3 1
+3 2
+11 1
fi=(58) /build/buildd-eglibc_2.11.2-6-i386-6jE6oF/eglibc-2.11.2/nptl/../nptl/sysdeps/unix/sysv/linux/i386/smp.h
40 1
fe=(43)
434 1
+3 2
+2 2
+6 3
cob=(4)
cfi=(56) /build/buildd-eglibc_2.11.2-6-i386-6jE6oF/eglibc-2.11.2/nptl/../nptl/sysdeps/unix/sysv/linux/libc_pthread_init.c
cfn=(248) __libc_pthread_init
calls=1 43
* 458
cob=(1)
cfi=(46)
cfn=(208)
calls=1 29
* 1630
fi=(58)
40 2
cob=(4)
cfi=(59) /build/buildd-eglibc_2.11.2-6-i386-6jE6oF/eglibc-2.11.2/posix/../sysdeps/unix/syscall-template.S
cfn=(258) uname
calls=1 +42
* 10
cob=(1)
cfi=(46)
cfn=(208)
calls=1 -11
* 1377
* 3
+15 4
cob=(4)
cfi=(62) /build/buildd-eglibc_2.11.2-6-i386-6jE6oF/eglibc-2.11.2/string/../string/strstr.c
cfn=(268) __GI_strstr
calls=1 -2
* 366
cob=(1)
cfi=(46)
cfn=(208)
calls=1 -26
* 1474
fe=(43)
449 4
+1 6
|