From 586cc683d875b37dce82c825feb9ccc7d884b35e Mon Sep 17 00:00:00 2001 From: bde Date: Fri, 29 Dec 1995 15:30:05 +0000 Subject: Implemented non-statistical kernel profiling. This is based on looking at a high resolution clock for each of the following events: function call, function return, interrupt entry, interrupt exit, and interesting branches. The differences between the times of these events are added at appropriate places in a ordinary histogram (as if very fast statistical profiling sampled the pc at those places) so that ordinary gprof can be used to analyze the times. gmon.h: Histogram counters need to be 4 bytes for microsecond resolutions. They will need to be larger for the 586 clock. The comments were vax-centric and wrong even on vaxes. Does anyone disagree? gprof4.c: The standard gprof should support counters of all integral sizes and the size of the counter should be in the gmon header. This hack will do until then. (Use gprof4 -u to examine the results of non-statistical profiling.) config/*: Non-statistical profiling is configured with `config -pp'. `config -p' still gives ordinary profiling. kgmon/*: Non-statistical profiling is enabled with `kgmon -B'. `kgmon -b' still enables ordinary profiling (and distables non-statistical profiling) if non-statistical profiling is configured. --- usr.bin/gprof4/Makefile | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 usr.bin/gprof4/Makefile (limited to 'usr.bin/gprof4') diff --git a/usr.bin/gprof4/Makefile b/usr.bin/gprof4/Makefile new file mode 100644 index 0000000..f5c2c83 --- /dev/null +++ b/usr.bin/gprof4/Makefile @@ -0,0 +1,14 @@ +# This was cloned from the Makefile for gprof by changing PROG from gprof +# to gprof4, adding NOMAN and PATH, adding -DGPROF4 to CFLAGS and deleting +# beforeinstall. + +# @(#)Makefile 5.17 (Berkeley) 5/11/90 + +PROG= gprof4 +NOMAN= noman +SRCS= gprof.c arcs.c dfn.c lookup.c ${MACHINE}.c hertz.c \ + printgprof.c printlist.c +CFLAGS+=-DGPROF4 +.PATH: ${.CURDIR}/../../usr.bin/gprof + +.include -- cgit v1.1