--- /dev/null
+/* ==> Do not modify this file!! It is created automatically
+ by make-c-prog.awk; modify make-c-prog.awk instead. <== */
+
+#include <stdio.h>
+
+void
+flat_blurb (file)
+ FILE *file;
+{
+ fputs ("\n", file);
+ fputs ("\n", file);
+ fputs ("\n", file);
+ fputs ("flat profile:\n", file);
+ fputs ("\n", file);
+ fputs (" % the percentage of the total running time of the\n", file);
+ fputs ("time program used by this function.\n", file);
+ fputs ("\n", file);
+ fputs ("cumulative a running sum of the number of seconds accounted\n", file);
+ fputs (" seconds for by this function and those listed above it.\n", file);
+ fputs ("\n", file);
+ fputs (" self the number of seconds accounted for by this\n", file);
+ fputs ("seconds function alone. This is the major sort for this\n", file);
+ fputs (" listing.\n", file);
+ fputs ("\n", file);
+ fputs ("calls the number of times this function was invoked, if\n", file);
+ fputs (" this function is profiled, else blank.\n", file);
+ fputs (" \n", file);
+ fputs (" self the average number of milliseconds spent in this\n", file);
+ fputs ("ms/call function per call, if this function is profiled,\n", file);
+ fputs (" else blank.\n", file);
+ fputs ("\n", file);
+ fputs (" total the average number of milliseconds spent in this\n", file);
+ fputs ("ms/call function and its descendents per call, if this \n", file);
+ fputs (" function is profiled, else blank.\n", file);
+ fputs ("\n", file);
+ fputs ("name the name of the function. This is the minor sort\n", file);
+ fputs (" for this listing. The index shows the location of\n", file);
+ fputs (" the function in the gprof listing. If the index is\n", file);
+ fputs (" in parenthesis it shows where it would appear in\n", file);
+ fputs (" the gprof listing if it were to be printed.\n", file);
+ fputs ("\f\n", file);
+}
+
+void
+callg_blurb (file)
+ FILE *file;
+{
+ fputs ("\n", file);
+ fputs ("\n", file);
+ fputs ("\n", file);
+ fputs ("call graph profile:\n", file);
+ fputs (" The sum of self and descendents is the major sort\n", file);
+ fputs (" for this listing.\n", file);
+ fputs ("\n", file);
+ fputs (" function entries:\n", file);
+ fputs ("\n", file);
+ fputs ("index the index of the function in the call graph\n", file);
+ fputs (" listing, as an aid to locating it (see below).\n", file);
+ fputs ("\n", file);
+ fputs ("%time the percentage of the total time of the program\n", file);
+ fputs (" accounted for by this function and its\n", file);
+ fputs (" descendents.\n", file);
+ fputs ("\n", file);
+ fputs ("self the number of seconds spent in this function\n", file);
+ fputs (" itself.\n", file);
+ fputs ("\n", file);
+ fputs ("descendents\n", file);
+ fputs (" the number of seconds spent in the descendents of\n", file);
+ fputs (" this function on behalf of this function.\n", file);
+ fputs ("\n", file);
+ fputs ("called the number of times this function is called (other\n", file);
+ fputs (" than recursive calls).\n", file);
+ fputs ("\n", file);
+ fputs ("self the number of times this function calls itself\n", file);
+ fputs (" recursively.\n", file);
+ fputs ("\n", file);
+ fputs ("name the name of the function, with an indication of\n", file);
+ fputs (" its membership in a cycle, if any.\n", file);
+ fputs ("\n", file);
+ fputs ("index the index of the function in the call graph\n", file);
+ fputs (" listing, as an aid to locating it.\n", file);
+ fputs ("\n", file);
+ fputs ("\n", file);
+ fputs ("\n", file);
+ fputs (" parent listings:\n", file);
+ fputs ("\n", file);
+ fputs ("self* the number of seconds of this function's self time\n", file);
+ fputs (" which is due to calls from this parent.\n", file);
+ fputs ("\n", file);
+ fputs ("descendents*\n", file);
+ fputs (" the number of seconds of this function's\n", file);
+ fputs (" descendent time which is due to calls from this\n", file);
+ fputs (" parent.\n", file);
+ fputs ("\n", file);
+ fputs ("called** the number of times this function is called by\n", file);
+ fputs (" this parent. This is the numerator of the\n", file);
+ fputs (" fraction which divides up the function's time to\n", file);
+ fputs (" its parents.\n", file);
+ fputs ("\n", file);
+ fputs ("total* the number of times this function was called by\n", file);
+ fputs (" all of its parents. This is the denominator of\n", file);
+ fputs (" the propagation fraction.\n", file);
+ fputs ("\n", file);
+ fputs ("parents the name of this parent, with an indication of the\n", file);
+ fputs (" parent's membership in a cycle, if any.\n", file);
+ fputs ("\n", file);
+ fputs ("index the index of this parent in the call graph\n", file);
+ fputs (" listing, as an aid in locating it.\n", file);
+ fputs ("\n", file);
+ fputs ("\n", file);
+ fputs ("\n", file);
+ fputs (" children listings:\n", file);
+ fputs ("\n", file);
+ fputs ("self* the number of seconds of this child's self time\n", file);
+ fputs (" which is due to being called by this function.\n", file);
+ fputs ("\n", file);
+ fputs ("descendent*\n", file);
+ fputs (" the number of seconds of this child's descendent's\n", file);
+ fputs (" time which is due to being called by this\n", file);
+ fputs (" function.\n", file);
+ fputs ("\n", file);
+ fputs ("called** the number of times this child is called by this\n", file);
+ fputs (" function. This is the numerator of the\n", file);
+ fputs (" propagation fraction for this child.\n", file);
+ fputs ("\n", file);
+ fputs ("total* the number of times this child is called by all\n", file);
+ fputs (" functions. This is the denominator of the\n", file);
+ fputs (" propagation fraction.\n", file);
+ fputs ("\n", file);
+ fputs ("children the name of this child, and an indication of its\n", file);
+ fputs (" membership in a cycle, if any.\n", file);
+ fputs ("\n", file);
+ fputs ("index the index of this child in the call graph listing,\n", file);
+ fputs (" as an aid to locating it.\n", file);
+ fputs ("\n", file);
+ fputs ("\n", file);
+ fputs ("\n", file);
+ fputs (" * these fields are omitted for parents (or\n", file);
+ fputs (" children) in the same cycle as the function. If\n", file);
+ fputs (" the function (or child) is a member of a cycle,\n", file);
+ fputs (" the propagated times and propagation denominator\n", file);
+ fputs (" represent the self time and descendent time of the\n", file);
+ fputs (" cycle as a whole.\n", file);
+ fputs ("\n", file);
+ fputs (" ** static-only parents and children are indicated\n", file);
+ fputs (" by a call count of 0.\n", file);
+ fputs ("\n", file);
+ fputs ("\n", file);
+ fputs ("\n", file);
+ fputs (" cycle listings:\n", file);
+ fputs (" the cycle as a whole is listed with the same\n", file);
+ fputs (" fields as a function entry. Below it are listed\n", file);
+ fputs (" the members of the cycle, and their contributions\n", file);
+ fputs (" to the time and call counts of the cycle.\n", file);
+ fputs ("\f\n", file);
+}
* a bunch of <from,self,count> tuples.
*/
while ( fread( &arc , sizeof arc , 1 , pfile ) == 1 ) {
- arc.raw_frompc = bfd_get_32 (abfd, &arc.raw_frompc);
- arc.raw_selfpc = bfd_get_32 (abfd, &arc.raw_selfpc);
- arc.raw_count = bfd_get_32 (abfd, &arc.raw_count);
+ arc.raw_frompc = bfd_get_32 (abfd, (bfd_byte *) &arc.raw_frompc);
+ arc.raw_selfpc = bfd_get_32 (abfd, (bfd_byte *) &arc.raw_selfpc);
+ arc.raw_count = bfd_get_32 (abfd, (bfd_byte *) &arc.raw_count);
# ifdef DEBUG
if ( debug & SAMPLEDEBUG ) {
printf( "[getpfile] frompc 0x%x selfpc 0x%x count %d\n" ,
done();
}
fread(&tmp, sizeof(struct hdr), 1, pfile);
- tmp.lowpc = (char*)bfd_get_32 (abfd, &tmp.lowpc);
- tmp.highpc = (char*)bfd_get_32 (abfd, &tmp.highpc);
- tmp.ncnt = bfd_get_32 (abfd, &tmp.ncnt);
+ tmp.lowpc = (UNIT *)bfd_get_32 (abfd, (bfd_byte *) &tmp.lowpc);
+ tmp.highpc = (UNIT *)bfd_get_32 (abfd, (bfd_byte *) &tmp.highpc);
+ tmp.ncnt = bfd_get_32 (abfd, (bfd_byte *) &tmp.ncnt);
if ( s_highpc != 0 && ( tmp.lowpc != h.lowpc ||
tmp.highpc != h.highpc || tmp.ncnt != h.ncnt ) ) {
}
for (i = 0; i < nsamples; i++) {
fread(&sample, sizeof (UNIT), 1, pfile);
- sample = bfd_get_16 (abfd, &sample);
+ sample = bfd_get_16 (abfd, (bfd_byte *) &sample);
if (feof(pfile))
break;
samples[i] += sample;