Callgrind Format Specification
•
summary:
costs
[Callgrind]
totals:
costs
[Cachegrind]
The value or the total number of events covered by this trace file.
Both keys have the same meaning, but the
"totals:" line happens to be at the end of the file, while "summary:" appears in the header. This was added to allow
postprocessing tools to know in advance to total cost. The two lines always give the same cost counts.
3.2.3. Description of Body Lines
There exist lines
spec=position
. The values for position specifications are arbitrary strings. When starting with
"(" and a digit, it’s a string in compressed format.
Otherwise it’s the real position string.
This allows for file and
symbol names as position strings, as these never start with "(" +
digit
. The compressed format is either "("
number
")"
space position
or only "("
number
")".
The first relates
position
to
number
in the context of the given format
specification from this line to the end of the file; it makes the (
number
) an alias for
position
. Compressed format is
always optional.
Position specifications allowed:
•
ob=
[Callgrind]
The ELF object where the cost of next cost lines happens.
•
fl=
[Cachegrind]
•
fi=
[Cachegrind]
•
fe=
[Cachegrind]
The source file including the code which is responsible for the cost of next cost lines. "fi="/"fe=" is used when the
source file changes inside of a function, i.e. for inlined code.
•
fn=
[Cachegrind]
The name of the function where the cost of next cost lines happens.
•
cob=
[Callgrind]
The ELF object of the target of the next call cost lines.
•
cfl=
[Callgrind]
The source file including the code of the target of the next call cost lines.
•
cfn=
[Callgrind]
The name of the target function of the next call cost lines.
•
calls=
[Callgrind]
The number of nonrecursive calls which are responsible for the cost specified by the next call cost line. This is the
cost spent inside of the called function.
After "calls=" there MUST be a cost line. This is the cost spent in the called function. The first number is the source
line from where the call happened.
17