head	1.5;
access;
symbols
	RELENG_4_11_0_RELEASE:1.3
	RELENG_4_11:1.3.0.24
	RELENG_4_11_BP:1.3
	RELENG_4_10_0_RELEASE:1.3
	RELENG_4_10:1.3.0.22
	RELENG_4_10_BP:1.3
	RELENG_4_9_0_RELEASE:1.3
	RELENG_4_9:1.3.0.20
	RELENG_4_9_BP:1.3
	RELENG_4_8_0_RELEASE:1.3
	RELENG_4_8:1.3.0.18
	RELENG_4_8_BP:1.3
	RELENG_4_7_0_RELEASE:1.3
	RELENG_4_7:1.3.0.16
	RELENG_4_7_BP:1.3
	RELENG_4_6_2_RELEASE:1.3
	RELENG_4_6_1_RELEASE:1.3
	RELENG_4_6_0_RELEASE:1.3
	RELENG_4_6:1.3.0.14
	RELENG_4_6_BP:1.3
	RELENG_4_5_0_RELEASE:1.3
	RELENG_4_5:1.3.0.12
	RELENG_4_5_BP:1.3
	RELENG_4_4_0_RELEASE:1.3
	RELENG_4_4:1.3.0.10
	RELENG_4_4_BP:1.3
	RELENG_4_3_0_RELEASE:1.3
	RELENG_4_3:1.3.0.8
	RELENG_4_3_BP:1.3
	RELENG_4_2_0_RELEASE:1.3
	RELENG_4_1_1_RELEASE:1.3
	PRE_SMPNG:1.3
	RELENG_4_1_0_RELEASE:1.3
	RELENG_3_5_0_RELEASE:1.3
	RELENG_4_0_0_RELEASE:1.3
	RELENG_4:1.3.0.6
	RELENG_4_BP:1.3
	RELENG_3_4_0_RELEASE:1.3
	RELENG_3_3_0_RELEASE:1.3
	RELENG_3_2_PAO:1.3.0.4
	RELENG_3_2_PAO_BP:1.3
	RELENG_3_2_0_RELEASE:1.3
	RELENG_3_1_0_RELEASE:1.3
	RELENG_3:1.3.0.2
	RELENG_3_BP:1.3
	RELENG_2_2_8_RELEASE:1.1
	RELENG_3_0_0_RELEASE:1.3
	RELENG_2_2_7_RELEASE:1.1
	RELENG_2_2_6_RELEASE:1.1
	RELENG_2_2_5_RELEASE:1.1
	RELENG_2_2_2_RELEASE:1.1
	RELENG_2_2_1_RELEASE:1.1
	RELENG_2_2_0_RELEASE:1.1
	RELENG_2_2:1.1.0.2
	RELENG_2_2_BP:1.1;
locks; strict;
comment	@# @;


1.5
date	2002.03.06.14.10.48;	author bde;	state dead;
branches;
next	1.4;

1.4
date	2001.10.30.15.54.09;	author green;	state Exp;
branches;
next	1.3;

1.3
date	98.09.07.23.32.00;	author jdp;	state Exp;
branches;
next	1.2;

1.2
date	98.09.05.08.21.36;	author jb;	state Exp;
branches;
next	1.1;

1.1
date	95.12.29.15.29.43;	author bde;	state Exp;
branches;
next	;


desc
@@


1.5
log
@Removed gprof4.  8-byte counters are now handled by gprof.
@
text
@# 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
#	$FreeBSD: src/usr.bin/gprof4/Makefile,v 1.4 2001/10/30 15:54:09 green Exp $

PROG=	gprof4
NOMAN=	noman
SRCS=	gprof.c aout.c arcs.c dfn.c elf.c lookup.c ${MACHINE_ARCH}.c hertz.c \
	printgprof.c printlist.c kernel.c
CFLAGS+=-DGPROF4
.PATH:	${.CURDIR}/../../usr.bin/gprof

.include <bsd.prog.mk>
@


1.4
log
@Add -K support to gprof(1), which enables dynamic symbol resolution from
the currently-running kernel (and supercedes an executable file argument
given).  With this change, properly-compiled KLD modules are now
able to be profiled.

Obtained from:	NAI Labs CBOSS project
Funded by:	DARPA
@
text
@d6 1
a6 1
#	$FreeBSD$
@


1.3
log
@Make profiling work for ELF.  gprof now autodetects the format of
the executable file, so it will work for both a.out and ELF format
files.  I have split the object format specific code into separate
source files.  It's cleaner than it was before, but it's still
pretty crufty.

Don't cheat on your make world for this update.  A lot of things
have to be rebuilt for it to work, including the compiler and all
of the profiled libraries.
@
text
@d6 1
d11 1
a11 1
	printgprof.c printlist.c
@


1.2
log
@Change MACHINE to MACHINE_ARCH to support MACHINE=pc98.
@
text
@d9 1
a9 1
SRCS=	gprof.c arcs.c dfn.c lookup.c ${MACHINE_ARCH}.c hertz.c \
@


1.1
log
@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.
@
text
@d9 1
a9 1
SRCS=	gprof.c arcs.c dfn.c lookup.c ${MACHINE}.c hertz.c \
@
