Debian Codegraph @

doc/guide/src/ShowProf.adoc

raw
1 = ShowProf
2
3 If an executable is compiled for <<Profiling#,profiling>>, then it
4 accepts a special command-line runtime system argument, `show-prof`,
5 that outputs information about the source functions that are profiled.
6 Normally, this information is used by `mlprof`. This page documents
7 the `show-prof` output format, and is intended for those working on
8 the profiler internals.
9
10 The `show-prof` output is ASCII, and consists of a sequence of lines.
11
12 * The magic number of the executable.
13 * The number of source names in the executable.
14 * A line for each source name giving the name of the function, a tab,
15 the filename of the file containing the function, a colon, a space,
16 and the line number that the function starts on in that file.
17 * The number of (split) source functions.
18 * A line for each (split) source function, where each line consists of
19 a source-name index (into the array of source names) and a successors
20 index (into the array of split-source sequences, defined below).
21 * The number of split-source sequences.
22 * A line for each split-source sequence, where each line is a space
23 separated list of (split) source functions.
24
25 The latter two arrays, split sources and split-source sequences,
26 define a directed graph, which is the call-graph of the program.