SCCS-vsn: usr.bin/gprof/PSD.doc/postp.me 1.12
-\" @(#)postp.me 1.11 %G%
+\" @(#)postp.me 1.12 %G%
The topological numbering ensures that
all edges in the graph go from higher numbered nodes to lower
numbered nodes.
The topological numbering ensures that
all edges in the graph go from higher numbered nodes to lower
numbered nodes.
+An example is given in Figure 1.
If we propagate time from nodes in the
If we propagate time from nodes in the
-reverse order assigned by the algorithm,
+order assigned by the algorithm,
execution time can be propagated from descendants to ancestors
after a single traversal of each arc in the call graph.
Each parent receives some fraction of a child's time.
execution time can be propagated from descendants to ancestors
after a single traversal of each arc in the call graph.
Each parent receives some fraction of a child's time.
+Figure 1. Topological ordering
Calls among the members of the cycle
do not propagate any time,
though they are listed in the call graph profile.
Calls among the members of the cycle
do not propagate any time,
though they are listed in the call graph profile.
+.pp
+Figure 2 shows a modified version of the call graph of Figure 1,
+in which the nodes labelled 3 and 7 in Figure 1 are mutually
+recursive.
+The topologically sorted graph after the cycle is collapsed is
+given in Figure 3.
+Figure 2. Cycle to be collapsed.
-Topological numbering after cycle collapsing.
+Figure 3. Topological numbering after cycle collapsing.
(which may not be available),
and scanning and parsing that text,
which may be in any one of several languages.
(which may not be available),
and scanning and parsing that text,
which may be in any one of several languages.
In our programming system,
the static calling information is also contained in the
executable version of the program,
In our programming system,
the static calling information is also contained in the
executable version of the program,