aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/gprof/gprof.h
diff options
context:
space:
mode:
authorBruce Evans <bde@FreeBSD.org>1995-12-29 15:46:59 +0000
committerBruce Evans <bde@FreeBSD.org>1995-12-29 15:46:59 +0000
commite6c645fad204937f30de0b6fd13aa2a52243a115 (patch)
treeb2ad95a7a10eb67a3c235c209274e27b0a701d9c /usr.bin/gprof/gprof.h
parent912e60377833803e8c89e2cbfd4c8eb8a6d90280 (diff)
downloadsrc-e6c645fad204937f30de0b6fd13aa2a52243a115.tar.gz
src-e6c645fad204937f30de0b6fd13aa2a52243a115.zip
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.
Notes
Notes: svn path=/head/; revision=13108
Diffstat (limited to 'usr.bin/gprof/gprof.h')
-rw-r--r--usr.bin/gprof/gprof.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/usr.bin/gprof/gprof.h b/usr.bin/gprof/gprof.h
index 31bada9b8f02..afe435745caf 100644
--- a/usr.bin/gprof/gprof.h
+++ b/usr.bin/gprof/gprof.h
@@ -81,7 +81,11 @@ typedef int bool;
*/
long hz;
+#ifdef GPROF4
+typedef unsigned int UNIT;
+#else
typedef u_short UNIT; /* unit of profiling */
+#endif
char *a_outname;
#define A_OUTNAME "a.out"