]> Git Repo - binutils.git/blob - gprof/blurbs.c
* gprof.h, gprof.c, printfgprof.c: Add support for two
[binutils.git] / gprof / blurbs.c
1 #include <stdio.h>
2 #include "gprof.h"
3
4 void
5 flat_blurb (file)
6      FILE *file;
7 {
8    fputs("\n\
9  %         the percentage of the total running time of the\n\
10 time       program used by this function.\n\
11 \n\
12 cumulative a running sum of the number of seconds accounted\n\
13  seconds   for by this function and those listed above it.\n\
14 \n\
15  self      the number of seconds accounted for by this\n\
16 seconds    function alone.  This is the major sort for this\n\
17            listing.\n\
18 \n\
19 calls      the number of times this function was invoked, if\n\
20            this function is profiled, else blank.\n\
21  \n\
22  self      the average number of milliseconds spent in this\n\
23 ms/call    function per call, if this function is profiled,\n\
24            else blank.\n\
25 \n\
26  total     the average number of milliseconds spent in this\n\
27 ms/call    function and its descendents per call, if this \n\
28            function is profiled, else blank.\n\
29 \n\
30 name       the name of the function.  This is the minor sort\n\
31            for this listing. The index shows the location of\n\
32            the function in the gprof listing. If the index is\n\
33            in parenthesis it shows where it would appear in\n\
34            the gprof listing if it were to be printed.\n\
35 \f\n", file);
36 }
37
38 static char *callg_blurb_bsd = "\n\
39 \n\
40 \n\
41 call graph profile:\n\
42           The sum of self and descendents is the major sort\n\
43           for this listing.\n\
44 \n\
45           function entries:\n\
46 \n\
47 index     the index of the function in the call graph\n\
48           listing, as an aid to locating it (see below).\n\
49 \n\
50 %time     the percentage of the total time of the program\n\
51           accounted for by this function and its\n\
52           descendents.\n\
53 \n\
54 self      the number of seconds spent in this function\n\
55           itself.\n\
56 \n\
57 descendents\n\
58           the number of seconds spent in the descendents of\n\
59           this function on behalf of this function.\n\
60 \n\
61 called    the number of times this function is called (other\n\
62           than recursive calls).\n\
63 \n\
64 self      the number of times this function calls itself\n\
65           recursively.\n\
66 \n\
67 name      the name of the function, with an indication of\n\
68           its membership in a cycle, if any.\n\
69 \n\
70 index     the index of the function in the call graph\n\
71           listing, as an aid to locating it.\n\
72 \n\
73 \n\
74 \n\
75           parent listings:\n\
76 \n\
77 self*     the number of seconds of this function's self time\n\
78           which is due to calls from this parent.\n\
79 \n\
80 descendents*\n\
81           the number of seconds of this function's\n\
82           descendent time which is due to calls from this\n\
83           parent.\n\
84 \n\
85 called**  the number of times this function is called by\n\
86           this parent.  This is the numerator of the\n\
87           fraction which divides up the function's time to\n\
88           its parents.\n\
89 \n\
90 total*    the number of times this function was called by\n\
91           all of its parents.  This is the denominator of\n\
92           the propagation fraction.\n\
93 \n\
94 parents   the name of this parent, with an indication of the\n\
95           parent's membership in a cycle, if any.\n\
96 \n\
97 index     the index of this parent in the call graph\n\
98           listing, as an aid in locating it.\n\
99 \n\
100 \n\
101 \n\
102           children listings:\n\
103 \n\
104 self*     the number of seconds of this child's self time\n\
105           which is due to being called by this function.\n\
106 \n\
107 descendent*\n\
108           the number of seconds of this child's descendent's\n\
109           time which is due to being called by this\n\
110           function.\n\
111 \n\
112 called**  the number of times this child is called by this\n\
113           function.  This is the numerator of the\n\
114           propagation fraction for this child.\n\
115 \n\
116 total*    the number of times this child is called by all\n\
117           functions.  This is the denominator of the\n\
118           propagation fraction.\n\
119 \n\
120 children  the name of this child, and an indication of its\n\
121           membership in a cycle, if any.\n\
122 \n\
123 index     the index of this child in the call graph listing,\n\
124           as an aid to locating it.\n\
125 \n\
126 \n\
127 \n\
128           * these fields are omitted for parents (or\n\
129           children) in the same cycle as the function.  If\n\
130           the function (or child) is a member of a cycle,\n\
131           the propagated times and propagation denominator\n\
132           represent the self time and descendent time of the\n\
133           cycle as a whole.\n\
134 \n\
135           ** static-only parents and children are indicated\n\
136           by a call count of 0.\n\
137 \n\
138 \n\
139 \n\
140           cycle listings:\n\
141           the cycle as a whole is listed with the same\n\
142           fields as a function entry.  Below it are listed\n\
143           the members of the cycle, and their contributions\n\
144           to the time and call counts of the cycle.\n\
145 \f\n";
146
147 static char *callg_blurb_fsf = "\n\
148  This table describes the call tree of the program, and was sorted by\n\
149  the total amount of time spent in each function and its children.\n\n\
150  Each entry in this table consists of several lines.  The line with the\n\
151  index number at the left hand margin lists the current function.\n\
152  The lines above it list the functions that called this function,\n\
153  and the lines below it list the functions this one called.\n\
154  This line lists:\n\
155      index      A unique number given to each element of the table.\n\
156                 Index numbers are sorted numerically.\n\
157                 The index number is printed next to every function name so\n\
158                 it is easier to look up where the function in the table.\n\n\
159      % time     This is the percentage of the `total' time that was spent\n\
160                 in this function and its children.  Note that due to\n\
161                 different viewpoints, functions excluded by options, etc,\n\
162                 these numbers will NOT add up to 100%.\n\n\
163      self       This is the total amount of time spent in this function.\n\n\
164      children   This is the total amount of time propagated into this\n\
165                 function by its children.\n\n\
166      called     This is the number of times the function was called.\n\
167                 If the function called itself recursively, the number\n\
168                 only includes non-recursive calls, and is followed by\n\
169                 a `+' and the number of recursive calls.\n\n\
170      name       The name of the current function.  The index number is\n\
171                 printed after it.  If the function is a member of a\n\
172                 cycle, the cycle number is printed between the\n\
173                 function's name and the index number.\n\n\n\
174  For the function's parents, the fields have the following meanings:\n\n\
175      self       This is the amount of time that was propagated directly\n\
176                 from the function into this parent.\n\n\
177      children   This is the amount of time that was propagated from\n\
178                 the function's children into this parent.\n\n\
179      called     This is the number of times this parent called the\n\
180                 function `/' the total number of times the function\n\
181                 was called.  Recursive calls to the function are not\n\
182                 included in the number after the `/'.\n\n\
183      name       This is the name of the parent.  The parent's index\n\
184                 number is printed after it.  If the parent is a\n\
185                 member of a cycle, the cycle number is printed between\n\
186                 the name and the index number.\n\n\
187  If the parents of the function cannot be determined, the word\n\
188  `<spontaneous>' is printed in the `name' field, and all the other\n\
189  fields are blank.\n\n\
190  For the function's children, the fields have the following meanings:\n\n\
191      self       This is the amount of time that was propagated directly\n\
192                 from the child into the function.\n\n\
193      children   This is the amount of time that was propagated from the\n\
194                 child's children to the function.\n\n\
195      called     This is the number of times the function called\n\
196                 this child `/' the total number of times the child\n\
197                 was called.  Recursive calls by the child are not\n\
198                 listed in the number after the `/'.\n\n\
199      name       This is the name of the child.  The child's index\n\
200                 number is printed after it.  If the child is a\n\
201                 member of a cycle, the cycle number is printed\n\
202                 between the name and the index number.\n\n\
203  If there are any cycles (circles) in the call graph, there is an\n\
204  entry for the cycle-as-a-whole.  This entry shows who called the\n\
205  cycle (as parents) and the members of the cycle (as children.)\n\
206  The `+' recursive calls entry shows the number of function calls that\n\
207  were internal to the cycle, and the calls entry for each member shows,\n\
208  for that member, how many times it was called from other members of\n\
209  the cycle.\n\n";
210
211 void
212 callg_blurb (file)
213      FILE *file;
214 {
215     if (bsd_style_output)
216         fputs(callg_blurb_bsd, file);
217     else
218         fputs(callg_blurb_fsf, file);
219 }
This page took 0.034068 seconds and 4 git commands to generate.