date and time created 83/10/01 12:20:57 by sam
[unix-history] / usr / src / usr.bin / gprof / gprof.h
index 378a1f4..c1213c9 100644 (file)
@@ -1,12 +1,19 @@
-    /* sccsid:  @(#)gprof.h    1.12 (Berkeley) %G% */
+/*     gprof.h 1.19    83/08/11        */
 
 #include <stdio.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <a.out.h>
 
 #include <stdio.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <a.out.h>
-#include <pagsiz.h>
 #include "gcrt0.h"
 
 #include "gcrt0.h"
 
+#if vax
+#   include "vax.h"
+#endif
+#if sun
+#    include "sun.h"
+#endif
+
+
     /*
      * who am i, for error messages.
      */
     /*
      * who am i, for error messages.
      */
@@ -19,15 +26,10 @@ typedef int bool;
 #define        FALSE   0
 #define        TRUE    1
 
 #define        FALSE   0
 #define        TRUE    1
 
-    /*
-     * opcode of the `calls' instruction
-     */
-#define        CALLS   0xfb
-
     /*
      * ticks per second
      */
     /*
      * ticks per second
      */
-#define        HZ      60
+long   hz;
 
 typedef        short UNIT;             /* unit of profiling */
 char   *a_outname;
 
 typedef        short UNIT;             /* unit of profiling */
 char   *a_outname;
@@ -38,10 +40,10 @@ char        *gmonname;
 #define        GMONSUM                 "gmon.sum"
        
     /*
 #define        GMONSUM                 "gmon.sum"
        
     /*
-     * the directory where the descriptions of the fields
-     * of the profiles are kept.
+     * blurbs on the flat and graph profiles.
      */
      */
-#define        BLURBLIB                "/usr/lib/"
+#define        FLAT_BLURB      "/usr/lib/gprof.flat.blurb"
+#define        CALLG_BLURB     "/usr/lib/gprof.callg.blurb"
 
     /*
      * a constructed arc,
 
     /*
      * a constructed arc,
@@ -69,10 +71,14 @@ typedef struct arcstruct    arctype;
 struct nl {
     char               *name;          /* the name */
     unsigned long      value;          /* the pc entry point */
 struct nl {
     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 */
     double             childtime;      /* cumulative ticks in children */
     long               ncall;          /* how many times called */
     long               selfcalls;      /* how many calls to self */
     double             time;           /* ticks in this routine */
     double             childtime;      /* cumulative ticks in children */
     long               ncall;          /* how many times called */
     long               selfcalls;      /* how many calls to self */
+    double             propfraction;   /* what % of time propagates */
+    double             propself;       /* how much self time propagates */
+    double             propchild;      /* how much child time propagates */
     bool               printflag;      /* should this be printed? */
     int                        index;          /* index in the graph list */
     int                        toporder;       /* graph call chain top-sort order */
     bool               printflag;      /* should this be printed? */
     int                        index;          /* index in the graph list */
     int                        toporder;       /* graph call chain top-sort order */
@@ -90,8 +96,10 @@ int  nname;                  /* the number of function names */
 
     /*
      * flag which marks a nl entry as topologically ``busy''
 
     /*
      * flag which marks a nl entry as topologically ``busy''
+     * flag which marks a nl entry as topologically ``not_numbered''
      */
 #define        DFN_BUSY        -1
      */
 #define        DFN_BUSY        -1
+#define        DFN_NAN         0
 
     /* 
      * namelist entries for cycle headers.
 
     /* 
      * namelist entries for cycle headers.
@@ -147,27 +155,23 @@ bool      bflag;                          /* blurbs, too */
 bool   cflag;                          /* discovered call graph, too */
 bool   dflag;                          /* debugging options */
 bool   eflag;                          /* specific functions excluded */
 bool   cflag;                          /* discovered call graph, too */
 bool   dflag;                          /* debugging options */
 bool   eflag;                          /* specific functions excluded */
+bool   Eflag;                          /* functions excluded with time */
 bool   fflag;                          /* specific functions requested */
 bool   fflag;                          /* specific functions requested */
+bool   Fflag;                          /* functions requested with time */
 bool   sflag;                          /* sum multiple gmon.out files */
 bool   zflag;                          /* zero time/called functions, too */
 
     /*
 bool   sflag;                          /* sum multiple gmon.out files */
 bool   zflag;                          /* zero time/called functions, too */
 
     /*
-     * register for pc relative addressing
+     * structure for various string lists
      */
      */
-#define        PC      0xf
-
-enum opermodes {
-    literal, indexed, reg, regdef, autodec, autoinc, autoincdef, 
-    bytedisp, bytedispdef, worddisp, worddispdef, longdisp, longdispdef,
-    immediate, absolute, byterel, bytereldef, wordrel, wordreldef,
-    longrel, longreldef
-};
-typedef enum opermodes operandenum;
-
-struct modebyte {
-    unsigned int       regfield:4;
-    unsigned int       modefield:4;
+struct stringlist {
+    struct stringlist  *next;
+    char               *string;
 };
 };
+struct stringlist      *elist;
+struct stringlist      *Elist;
+struct stringlist      *flist;
+struct stringlist      *Flist;
 
     /*
      * function declarations
 
     /*
      * function declarations
@@ -238,4 +242,5 @@ int         totalcmp();
 #define        AOUTDEBUG       64
 #define        CALLSDEBUG      128
 #define        LOOKUPDEBUG     256
 #define        AOUTDEBUG       64
 #define        CALLSDEBUG      128
 #define        LOOKUPDEBUG     256
-#define        ANYDEBUG        512
+#define        PROPDEBUG       512
+#define        ANYDEBUG        1024