* @(#)gprof.h 5.9 (Berkeley) 6/1/90
*/
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <a.out.h>
-#include <stdio.h>
+#include <ansidecl.h>
+#include "sysdep.h"
+#include "bfd.h"
#include "gmon.h"
+/* AIX defines hz as a macro. */
+#undef hz
+
#ifdef MACHINE_H
# include MACHINE_H
#else
*/
long hz;
-typedef u_short UNIT; /* unit of profiling */
+typedef unsigned char UNIT[2]; /* unit of profiling */
char *a_outname;
#define A_OUTNAME "a.out"
#define GMONNAME "gmon.out"
#define GMONSUM "gmon.sum"
+extern int bsd_style_output;
+extern int discard_underscores;
+
/*
* a constructed arc,
* with pointers to the namelist entry of the parent and the child,
* its address, the number of calls and compute its share of cpu time.
*/
struct nl {
- char *name; /* the name */
+ CONST char *name; /* the name */
unsigned long value; /* the pc entry point */
unsigned long svalue; /* entry point aligned to histograms */
double time; /* ticks in this routine */
int ncnt;
};
+
+struct rawhdr {
+ char lowpc[4];
+ char highpc[4];
+ char ncnt[4];
+};
+
struct hdr h;
int debug;
* Each discretized pc sample has
* a count of the number of samples in its range
*/
-UNIT *samples;
+int *samples;
unsigned long s_lowpc; /* lowpc from the profile file */
unsigned long s_highpc; /* highpc from the profile file */
values: each sample covers scale bytes */
char *strtab; /* string table in core */
off_t ssiz; /* size of the string table */
-struct exec xbuf; /* exec header of a.out */
unsigned char *textspace; /* text space of a.out in core */
/*
printprof();
readsamples();
*/
+int printnameonly();
unsigned long reladdr();
/*
sortchildren();