name change to confuse to innocent/
authorPeter B. Kessler <peter@ucbvax.Berkeley.EDU>
Wed, 21 Oct 1981 07:50:22 +0000 (23:50 -0800)
committerPeter B. Kessler <peter@ucbvax.Berkeley.EDU>
Wed, 21 Oct 1981 07:50:22 +0000 (23:50 -0800)
SCCS-vsn: usr.bin/gprof/lookup.c 1.2
SCCS-vsn: usr.bin/gprof/Makefile 1.3
SCCS-vsn: usr.bin/gprof/gprof.h 1.2
SCCS-vsn: usr.bin/gprof/dfn.c 1.2
SCCS-vsn: usr.bin/gprof/arcs.c 1.2
SCCS-vsn: usr.bin/gprof/printgprof.c 1.2
SCCS-vsn: usr.bin/gprof/gprof.c 1.2

usr/src/usr.bin/gprof/Makefile
usr/src/usr.bin/gprof/arcs.c
usr/src/usr.bin/gprof/dfn.c
usr/src/usr.bin/gprof/gprof.c
usr/src/usr.bin/gprof/gprof.h
usr/src/usr.bin/gprof/lookup.c
usr/src/usr.bin/gprof/printgprof.c

index eecebd2..5fecdc2 100644 (file)
@@ -1,87 +1,72 @@
-SCCSID = @(#)Makefile  1.2 (Berkeley) %G%
-RRHBIN = /va/staff/rrh/bin
-NCC = ${RRHBIN}/ncc
-
-CFLAGS = -DDEBUG
-
-DPROFHDRS =    dprof.h
-DPROFSRCS =    dprof.c arcs.c dfn.c lookup.c printdprof.c
-DPROFOBJS =    dprof.o arcs.o dfn.o lookup.o printdprof.o
-OTHERS =       mcrt0.s monitor.h monitor.c monitor.ex
-
-dprof: $(DPROFOBJS)
-       cc -o dprof ${CFLAGS} $(DPROFOBJS)
-
-.c.o:
-       cc -c ${CFLAGS} $*.c
-
-mcrt0.o: mcrt0.s
-       as -o mcrt0.o mcrt0.s
-       -ld -x -r mcrt0.o
-       mv a.out mcrt0.o
-
-monitor.o: monitor.s
-       as -o monitor.o monitor.s
-
-monitor.s: monitor.c monitor.ex monitor.h
-       cc -S -DMONITOR monitor.c
-       ex - monitor.s < monitor.ex
-       /lib/cpp monitor.s > monitor.S
-       mv monitor.S monitor.s
-
-#
-#      NB: -x option to ncc is like -p, but uses
-#      different files to load at the beginning of
-#      the executable.
-#
-profit: profit.o monitor.o mcrt0.o
-       /bin/ld -X mcrt0.o monitor.o -o profit profit.o -lcp
-#      ${NCC} -x -p "-?" profit.o -o profit
+SCCSID = @(#)Makefile  1.3 (Berkeley) %G%
+
+CFLAGS =
+DFLAGS = 
+
+GPROFHDRS =    gprof.h
+GPROFSRCS =    gprof.c arcs.c dfn.c lookup.c printgprof.c
+GPROFOBJS =    gprof.o arcs.o dfn.o lookup.o printgprof.o
+OTHERS =       gmcrt0.c gmcrt0.h gmcrt0.ex
+
+gprof: ${GPROFOBJS}
+       cc -o gprof ${CFLAGS} ${GPROFOBJS}
+
+gmcrt0.o: gmcrt0.s
+       as -o gmcrt0.o gmcrt0.s
+
+gmcrt0.s: gmcrt0.c gmcrt0.h gmcrt0.ex
+       cc -S ${DFLAGS} gmcrt0.c
+       ex - gmcrt0.s < gmcrt0.ex
+       /lib/cpp gmcrt0.s > gmcrt0.S
+       mv gmcrt0.S gmcrt0.s
+
+profit: profit.o gmcrt0.o
+       /bin/ld -X gmcrt0.o -o profit profit.o -lcp
 
 profit.o:
 
 profit.o:
-       ${NCC} -x -p -c "-?" profit.c
+       cc -p -c profit.c
 
 
-dprof.o: dprof.c dprof.h
-arcs.o: arcs.c dprof.h
-lookup.o: lookup.c dprof.h
-dfn.o: dfn.c dprof.h
-printdprof.o: printdprof.c dprof.h
+gprof.o: gprof.c gprof.h
+arcs.o: arcs.c gprof.h
+lookup.o: lookup.c gprof.h
+dfn.o: dfn.c gprof.h
+printgprof.o: printgprof.c gprof.h
 
 
-PDPROF = p.dprof.o p.arcs.o p.dfn.o p.lookup.o p.printdprof.o
+PGPROF = p.gprof.o p.arcs.o p.dfn.o p.lookup.o p.printgprof.o
 
 
-p.dprof: ${PDPROF}
-       /bin/ld -X mcrt0.o monitor.o -o p.dprof ${PDPROF} -lcp
+p.gprof: ${PGPROF}
+       /bin/ld -X gmcrt0.o -o p.gprof ${PGPROF} -lcp
 
 
-p.dprof.o: dprof.c dprof.h
-       ln dprof.c p.dprof.c
-       cc -c -p ${CFLAGS} p.dprof.c
-       rm p.dprof.c
+p.gprof.o: gprof.c gprof.h
+       ln gprof.c p.gprof.c
+       cc -c -p ${CFLAGS} p.gprof.c
+       rm p.gprof.c
 
 
-p.arcs.o: arcs.c dprof.h
+p.arcs.o: arcs.c gprof.h
        ln arcs.c p.arcs.c
        cc -c -p ${CFLAGS} p.arcs.c
        rm p.arcs.c
 
        ln arcs.c p.arcs.c
        cc -c -p ${CFLAGS} p.arcs.c
        rm p.arcs.c
 
-p.dfn.o: dfn.c dprof.h
+p.dfn.o: dfn.c gprof.h
        ln dfn.c p.dfn.c
        cc -c -p ${CFLAGS} p.dfn.c
        rm p.dfn.c
 
        ln dfn.c p.dfn.c
        cc -c -p ${CFLAGS} p.dfn.c
        rm p.dfn.c
 
-p.lookup.o: lookup.c dprof.h
+p.lookup.o: lookup.c gprof.h
        ln lookup.c p.lookup.c
        cc -c -p ${CFLAGS} p.lookup.c
        rm p.lookup.c
 
        ln lookup.c p.lookup.c
        cc -c -p ${CFLAGS} p.lookup.c
        rm p.lookup.c
 
-p.printdprof.o: printdprof.c dprof.h
-       ln printdprof.c p.printdprof.c
-       cc -c -p ${CFLAGS} p.printdprof.c
-       rm p.printdprof.c
+p.printgprof.o: printgprof.c gprof.h
+       ln printgprof.c p.printgprof.c
+       cc -c -p ${CFLAGS} p.printgprof.c
+       rm p.printgprof.c
 
 LINTFLAGS = -x -a -n
 lint:
 
 LINTFLAGS = -x -a -n
 lint:
-       lint ${CFLAGS} ${LINTFLAGS} dprof.c arcs.c dfn.c lookup.c printdprof.c
+       lint ${CFLAGS} ${LINTFLAGS} gprof.c arcs.c dfn.c lookup.c printgprof.c
 
 
-${DPROFHDRS} ${DPROFSRCS} ${OTHERS}:
+${GPROFHDRS} ${GPROFSRCS} ${OTHERS}:
        sccs get $@
 
        sccs get $@
 
-sources: ${DPROFHDRS} ${DPROFSRCS} ${OTHERS}
+sources: ${GPROFHDRS} ${GPROFSRCS} ${OTHERS}
index 56eb03e..5920c83 100644 (file)
@@ -1,8 +1,8 @@
 #ifndef lint
 #ifndef lint
-    static     char *sccsid = "@(#)arcs.c      1.1 (Berkeley) %G%";
+    static     char *sccsid = "@(#)arcs.c      1.2 (Berkeley) %G%";
 #endif lint
 
 #endif lint
 
-#include "dprof.h"
+#include "gprof.h"
 
 topcmp( npp1 , npp2 )
     nltype     **npp1;
 
 topcmp( npp1 , npp2 )
     nltype     **npp1;
@@ -187,7 +187,7 @@ doarcs()
            }
        }
     }
            }
        }
     }
-    printdprof();
+    printgprof();
 }
 
 cyclelink()
 }
 
 cyclelink()
index 01b11cc..256157c 100644 (file)
@@ -1,9 +1,9 @@
 #ifndef lint
 #ifndef lint
-    static     char *sccsid = "@(#)dfn.c       1.1 (Berkeley) %G%";
+    static     char *sccsid = "@(#)dfn.c       1.2 (Berkeley) %G%";
 #endif lint
 
 #include <stdio.h>
 #endif lint
 
 #include <stdio.h>
-#include "dprof.h"
+#include "gprof.h"
 
 #define        DFN_DEPTH       100
 struct dfnstruct {
 
 #define        DFN_DEPTH       100
 struct dfnstruct {
index 6dfd9ee..eb255cf 100644 (file)
@@ -1,8 +1,8 @@
 #ifndef lint
 #ifndef lint
-    static     char *sccsid = "@(#)gprof.c     1.1 (Berkeley) %G%";
+    static     char *sccsid = "@(#)gprof.c     1.2 (Berkeley) %G%";
 #endif lint
 
 #endif lint
 
-#include "dprof.h"
+#include "gprof.h"
 
 main(argc, argv)
        int argc;
 
 main(argc, argv)
        int argc;
@@ -33,10 +33,10 @@ main(argc, argv)
        a_outname  = A_OUTNAME;
     }
     if ( *argv != 0 ) {
        a_outname  = A_OUTNAME;
     }
     if ( *argv != 0 ) {
-       dmonname = *argv;
+       gmonname = *argv;
        argv++;
     } else {
        argv++;
     } else {
-       dmonname = DMONNAME;
+       gmonname = GMONNAME;
     }
        /*
         *      get information about a.out file.
     }
        /*
         *      get information about a.out file.
@@ -45,7 +45,7 @@ main(argc, argv)
        /*
         *      get information about mon.out file(s).
         */
        /*
         *      get information about mon.out file(s).
         */
-    getpfile( dmonname );
+    getpfile( gmonname );
        /*
         *      assign samples to procedures
         */
        /*
         *      assign samples to procedures
         */
@@ -260,7 +260,7 @@ getsymtab(nfile)
 }
 
     /*
 }
 
     /*
-     * information from a dmon.out file is in two parts:
+     * information from a gmon.out file is in two parts:
      * an array of sampling hits within pc ranges,
      * and the arcs.
      */
      * an array of sampling hits within pc ranges,
      * and the arcs.
      */
index 5644051..8584c35 100644 (file)
@@ -1,4 +1,4 @@
-    /* sccsid:  @(#)gprof.h    1.1 (Berkeley) %G% */
+    /* sccsid:  @(#)gprof.h    1.2 (Berkeley) %G% */
 
 #include <stdio.h>
 #include <sys/types.h>
 
 #include <stdio.h>
 #include <sys/types.h>
@@ -16,8 +16,8 @@ typedef       short UNIT;             /* unit of profiling */
 char   *a_outname;
 #define        A_OUTNAME               "a.out"
 
 char   *a_outname;
 #define        A_OUTNAME               "a.out"
 
-char   *dmonname;
-#define        DMONNAME                "dmon.out"
+char   *gmonname;
+#define        GMONNAME                "gmon.out"
 
     /*
      * a constructed arc,
 
     /*
      * a constructed arc,
@@ -56,11 +56,11 @@ struct nl {
        char            *name;          /* the name */
        unsigned long   value;          /* the pc entry point */
        double          time;           /* ticks in this routine */
        char            *name;          /* the name */
        unsigned long   value;          /* the pc entry point */
        double          time;           /* ticks in this routine */
-       double          childtime;      /* cumulative ticks in dynamic childs */
+       double          childtime;      /* cumulative ticks in children */
        long            ncall;          /* how many times called */
        long            selfcalls;      /* how many calls to self */
        long            ncall;          /* how many times called */
        long            selfcalls;      /* how many calls to self */
-       int             index;          /* index in the dynamic list */
-       int             toporder;       /* dynamic call chain top-sort order */
+       int             index;          /* index in the graph list */
+       int             toporder;       /* graph call chain top-sort order */
        int             cycleno;        /* internal number of cycle on */
        struct nl       *cyclehead;     /* pointer to head of cycle */
        struct nl       *cnext;         /* pointer to next member of cycle */
        int             cycleno;        /* internal number of cycle on */
        struct nl       *cyclehead;     /* pointer to head of cycle */
        struct nl       *cnext;         /* pointer to next member of cycle */
@@ -88,8 +88,8 @@ int   ncycles;                /* maximum allocated cycle headers */
 int    cyclemax;               /* number of cycles discovered */
 
 /*
 int    cyclemax;               /* number of cycles discovered */
 
 /*
- * The header on the dmon.out file.
- * dmon.out consists of one of these headers,
+ * The header on the gmon.out file.
+ * gmon.out consists of one of these headers,
  * and then an array of ncnt samples
  * representing the discretized program counter values.
  *     this should be a struct phdr, but since everything is done
  * and then an array of ncnt samples
  * representing the discretized program counter values.
  *     this should be a struct phdr, but since everything is done
index e4831d1..2471456 100644 (file)
@@ -1,8 +1,8 @@
 #ifndef lint
 #ifndef lint
-    static     char *sccsid = "@(#)lookup.c    1.1 (Berkeley) %G%";
+    static     char *sccsid = "@(#)lookup.c    1.2 (Berkeley) %G%";
 #endif lint
 
 #endif lint
 
-#include "dprof.h"
+#include "gprof.h"
 
     /*
      * look up an address in a sorted-by-address namelist
 
     /*
      * look up an address in a sorted-by-address namelist
index 2acb78f..f8dd136 100644 (file)
@@ -1,10 +1,10 @@
 #ifndef lint
 #ifndef lint
-    static     char *sccsid = "@(#)printgprof.c        1.1 (Berkeley) %G%";
+    static     char *sccsid = "@(#)printgprof.c        1.2 (Berkeley) %G%";
 #endif lint
 
 #endif lint
 
-#include "dprof.h"
+#include "gprof.h"
 
 
-printdprof()
+printgprof()
 {
     nltype     **timesortnlp;
     int                index;
 {
     nltype     **timesortnlp;
     int                index;