freebsd-dev/sys/libkern
Bruce Evans d6b9e17eb5 Improved non-statistical (GUPROF) profiling:
- use a more accurate and more efficient method of compensating for
  overheads.  The old method counted too much time against leaf
  functions.
- normally use the Pentium timestamp counter if available.
  On Pentiums, the times are now accurate to within a couple of cpu
  clock cycles per function call in the (unlikely) event that there
  are no cache misses in or caused by the profiling code.
- optionally use an arbitrary Pentium event counter if available.
- optionally regress to using the i8254 counter.
- scaled the i8254 counter by a factor of 128.  Now the i8254 counters
  overflow slightly faster than the TSC counters for a 150MHz Pentium :-)
  (after about 16 seconds).  This is to avoid fractional overheads.

files.i386:
permon.c temporarily has to be classified as a profiling-routine
because a couple of functions in it may be called from profiling code.

options.i386:
- I586_CTR_GUPROF is currently unused (oops).
- I586_PMC_GUPROF should be something like 0x70000 to enable (but not
  use unless prof_machdep.c is changed) support for Pentium event
  counters.  7 is a control mode and the counter number 0 is somewhere
  in the 0000 bits (see perfmon.h for the encoding).

profile.h:
- added declarations.
- cleaned up separation of user mode declarations.

prof_machdep.c:
Mostly clock-select changes.  The default clock can be changed by
editing kmem.  There should be a sysctl for this.

subr_prof.c:
- added copyright.
- calibrate overheads for the new method.
- documented new method.
- fixed races and and machine dependencies in start/stop code.

mcount.c:
Use the new overhead compensation method.

gmon.h:
- changed GPROF4 counter type from unsigned to int.  Oops, this should
  be machine-dependent and/or int32_t.
- reorganized overhead counters.

Submitted by:	Pentium event counter changes mostly by wollman
1996-10-17 19:32:31 +00:00
..
adddi3.c Added $Id$ 1994-08-02 07:55:43 +00:00
anddi3.c Added $Id$ 1994-08-02 07:55:43 +00:00
ashldi3.c Added $Id$ 1994-08-02 07:55:43 +00:00
ashrdi3.c Removed sccsids and rcsids and added Id$ to save space like everything 1996-08-28 20:32:21 +00:00
bcd.c Extend to handle all radix < 37 1996-01-24 20:51:26 +00:00
bcmp.c Added $Id$ 1994-08-02 07:55:43 +00:00
cmpdi2.c Added $Id$ 1994-08-02 07:55:43 +00:00
divdi3.c Updated #includes to 4.4Lite style. 1996-09-10 08:32:01 +00:00
ffs.c Added $Id$ 1994-08-02 07:55:43 +00:00
fnmatch.c Convert to newly aded collate compare function 1996-08-12 18:49:54 +00:00
index.c Added index() which will be used shortly in some fixes to the ibcs2 1996-06-07 22:21:31 +00:00
inet_ntoa.c Remove trailing whitespace. 1995-05-30 08:16:23 +00:00
iordi3.c Added $Id$ 1994-08-02 07:55:43 +00:00
locc.c <libkern/libkern.h> has moved to <sys/libkern.h> (repository copy). 1995-03-17 06:15:40 +00:00
lshldi3.c Added $Id$ 1994-08-02 07:55:43 +00:00
lshrdi3.c Added $Id$ 1994-08-02 07:55:43 +00:00
mcount.c Improved non-statistical (GUPROF) profiling: 1996-10-17 19:32:31 +00:00
moddi3.c Updated #includes to 4.4Lite style. 1996-09-10 08:32:01 +00:00
muldi3.c Remove trailing whitespace. 1995-05-30 08:16:23 +00:00
negdi2.c Added $Id$ 1994-08-02 07:55:43 +00:00
notdi2.c Added $Id$ 1994-08-02 07:55:43 +00:00
qdivrem.c Updated #includes to 4.4Lite style. 1996-09-10 08:32:01 +00:00
qsort.c Don't depend in the kernel on the gcc feature of doing arithmetic on 1996-08-31 14:48:13 +00:00
quad.h Don't depend on <sys/types.h> including <sys/cdefs.h>. 1996-04-19 17:39:57 +00:00
random.c add simple srandom() and prototype 1996-09-23 04:31:43 +00:00
rindex.c Added $Id$ 1994-08-02 07:55:43 +00:00
scanc.c Fixed the easy cases of const poisoning in the kernel. Cosmetic. 1996-08-31 16:52:44 +00:00
skpc.c <libkern/libkern.h> has moved to <sys/libkern.h> (repository copy). 1995-03-17 06:15:40 +00:00
strcat.c Added $Id$ 1994-08-02 07:55:43 +00:00
strcmp.c Fixed the easy cases of const poisoning in the kernel. Cosmetic. 1996-08-31 16:52:44 +00:00
strcpy.c Added $Id$ 1994-08-02 07:55:43 +00:00
strlen.c Added $Id$ 1994-08-02 07:55:43 +00:00
strncmp.c Fixed the easy cases of const poisoning in the kernel. Cosmetic. 1996-08-31 16:52:44 +00:00
strncpy.c Added $Id$ 1994-08-02 07:55:43 +00:00
strsep.c Remove trailing whitespace. 1995-05-30 05:51:47 +00:00
subdi3.c Added $Id$ 1994-08-02 07:55:43 +00:00
ucmpdi2.c Added $Id$ 1994-08-02 07:55:43 +00:00
udivdi3.c Updated #includes to 4.4Lite style. 1996-09-10 08:32:01 +00:00
umoddi3.c Updated #includes to 4.4Lite style. 1996-09-10 08:32:01 +00:00
xordi3.c Added $Id$ 1994-08-02 07:55:43 +00:00