version 1.16, 2015/12/06 23:22:51 |
version 1.17, 2021/01/27 07:18:41 |
|
|
/* |
/* |
* ticks per second |
* ticks per second |
*/ |
*/ |
long hz; |
extern long hz; |
|
|
typedef u_short UNIT; /* unit of profiling */ |
typedef u_short UNIT; /* unit of profiling */ |
char *a_outname; |
extern char *a_outname; |
#define A_OUTNAME "a.out" |
#define A_OUTNAME "a.out" |
|
|
char *gmonname; |
extern char *gmonname; |
#define GMONNAME "gmon.out" |
#define GMONNAME "gmon.out" |
#define GMONSUM "gmon.sum" |
#define GMONSUM "gmon.sum" |
|
|
|
|
}; |
}; |
typedef struct nl nltype; |
typedef struct nl nltype; |
|
|
nltype *nl; /* the whole namelist */ |
extern nltype *nl; /* the whole namelist */ |
nltype *npe; /* the virtual end of the namelist */ |
extern nltype *npe; /* the virtual end of the namelist */ |
int nname; /* the number of function names */ |
extern int nname; /* the number of function names */ |
|
|
#define HASCYCLEXIT 0x08 /* node has arc exiting from cycle */ |
#define HASCYCLEXIT 0x08 /* node has arc exiting from cycle */ |
#define CYCLEHEAD 0x10 /* node marked as head of a cycle */ |
#define CYCLEHEAD 0x10 /* node marked as head of a cycle */ |
|
|
}; |
}; |
typedef struct cl cltype; |
typedef struct cl cltype; |
|
|
arctype *archead; /* the head of arcs in current cycle list */ |
extern arctype *archead; /* the head of arcs in current cycle list */ |
cltype *cyclehead; /* the head of the list */ |
extern cltype *cyclehead; /* the head of the list */ |
int cyclecnt; /* the number of cycles found */ |
extern int cyclecnt; /* the number of cycles found */ |
#define CYCLEMAX 100 /* maximum cycles before cutting one of them */ |
#define CYCLEMAX 100 /* maximum cycles before cutting one of them */ |
|
|
/* |
/* |
|
|
* namelist entries for cycle headers. |
* namelist entries for cycle headers. |
* the number of discovered cycles. |
* the number of discovered cycles. |
*/ |
*/ |
nltype *cyclenl; /* cycle header namelist */ |
extern nltype *cyclenl; /* cycle header namelist */ |
int ncycle; /* number of cycles discovered */ |
extern int ncycle; /* number of cycles discovered */ |
|
|
/* |
/* |
* The header on the gmon.out file. |
* The header on the gmon.out file. |
|
|
int ncnt; |
int ncnt; |
}; |
}; |
|
|
int debug; |
extern int debug; |
|
|
/* |
/* |
* Each discretized pc sample has |
* Each discretized pc sample has |
* a count of the number of samples in its range |
* a count of the number of samples in its range |
*/ |
*/ |
UNIT *samples; |
extern UNIT *samples; |
|
|
unsigned long s_lowpc; /* lowpc from the profile file */ |
extern unsigned long s_lowpc; /* lowpc from the profile file */ |
unsigned long s_highpc; /* highpc from the profile file */ |
extern unsigned long s_highpc; /* highpc from the profile file */ |
unsigned long lowpc, highpc; /* range profiled, in UNIT's */ |
extern unsigned long lowpc, highpc; /* range profiled, in UNIT's */ |
unsigned sampbytes; /* number of bytes of samples */ |
extern unsigned sampbytes; /* number of bytes of samples */ |
int nsamples; /* number of samples */ |
extern int nsamples; /* number of samples */ |
double actime; /* accumulated time thus far for putprofline */ |
extern double actime; /* accumulated time thus far for putprofline */ |
double totime; /* total time for all routines */ |
extern double totime; /* total time for all routines */ |
double printtime; /* total of time being printed */ |
extern double printtime; /* total of time being printed */ |
double scale; /* scale factor converting samples to pc |
extern double scale; /* scale factor converting samples to pc |
values: each sample covers scale bytes */ |
values: each sample covers scale bytes */ |
unsigned char *textspace; /* text space of a.out in core */ |
extern unsigned char *textspace; /* text space of a.out in core */ |
int cyclethreshold; /* with -C, minimum cycle size to ignore */ |
extern int cyclethreshold; /* with -C, minimum cycle size to ignore */ |
|
|
/* |
/* |
* option flags, from a to z. |
* option flags, from a to z. |
*/ |
*/ |
bool aflag; /* suppress static functions */ |
extern bool aflag; /* suppress static functions */ |
bool bflag; /* blurbs, too */ |
extern bool bflag; /* blurbs, too */ |
bool cflag; /* discovered call graph, too */ |
extern bool cflag; /* discovered call graph, too */ |
bool Cflag; /* find cut-set to eliminate cycles */ |
extern bool Cflag; /* find cut-set to eliminate cycles */ |
bool dflag; /* debugging options */ |
extern bool dflag; /* debugging options */ |
bool eflag; /* specific functions excluded */ |
extern bool eflag; /* specific functions excluded */ |
bool Eflag; /* functions excluded with time */ |
extern bool Eflag; /* functions excluded with time */ |
bool fflag; /* specific functions requested */ |
extern bool fflag; /* specific functions requested */ |
bool Fflag; /* functions requested with time */ |
extern bool Fflag; /* functions requested with time */ |
bool kflag; /* arcs to be deleted */ |
extern bool kflag; /* arcs to be deleted */ |
bool sflag; /* sum multiple gmon.out files */ |
extern bool sflag; /* sum multiple gmon.out files */ |
bool zflag; /* zero time/called functions, too */ |
extern bool zflag; /* zero time/called functions, too */ |
|
|
/* |
/* |
* structure for various string lists |
* structure for various string lists |
|
|
struct stringlist *next; |
struct stringlist *next; |
char *string; |
char *string; |
}; |
}; |
struct stringlist *elist; |
extern struct stringlist *elist; |
struct stringlist *Elist; |
extern struct stringlist *Elist; |
struct stringlist *flist; |
extern struct stringlist *flist; |
struct stringlist *Flist; |
extern struct stringlist *Flist; |
struct stringlist *kfromlist; |
extern struct stringlist *kfromlist; |
struct stringlist *ktolist; |
extern struct stringlist *ktolist; |
|
|
/* |
/* |
* function declarations |
* function declarations |