diff options
author | bde <bde@FreeBSD.org> | 2002-02-21 07:12:57 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 2002-02-21 07:12:57 +0000 |
commit | 118c70fed9abb13a1decb1f77a6f0af7db9bbafd (patch) | |
tree | ccbf4fb113cf9c36ffe98a293f7b57cf6f7e7208 /usr.bin/gprof | |
parent | 9fe42a4fee4200348beab621671bea0816e7cd89 (diff) | |
download | FreeBSD-src-118c70fed9abb13a1decb1f77a6f0af7db9bbafd.zip FreeBSD-src-118c70fed9abb13a1decb1f77a6f0af7db9bbafd.tar.gz |
Moved the definition of the machine-independent macro UNITS_TO_CODE
from <number of machines> machine-dependent headers to the one
non-header here it is used so that it is easier to fix. This macro
just divides the machine-dependent offset OFFSET_OF_CODE by the
machine-independent scale factor sizeof(UNIT), as required for bug
for bug compatibility with the scaling of pc's in gprof.c. UNIT is
the type of a profiling counter, and its size has nothing to do with
the correct scale factor except both are usually 2.
Diffstat (limited to 'usr.bin/gprof')
-rw-r--r-- | usr.bin/gprof/alpha.h | 2 | ||||
-rw-r--r-- | usr.bin/gprof/amd64.h | 2 | ||||
-rw-r--r-- | usr.bin/gprof/gprof.c | 2 | ||||
-rw-r--r-- | usr.bin/gprof/gprof.h | 2 | ||||
-rw-r--r-- | usr.bin/gprof/hp300.h | 2 | ||||
-rw-r--r-- | usr.bin/gprof/i386.h | 2 | ||||
-rw-r--r-- | usr.bin/gprof/ia64.h | 1 | ||||
-rw-r--r-- | usr.bin/gprof/mips.h | 2 | ||||
-rw-r--r-- | usr.bin/gprof/sparc.h | 2 | ||||
-rw-r--r-- | usr.bin/gprof/tahoe.h | 2 | ||||
-rw-r--r-- | usr.bin/gprof/vax.h | 2 |
11 files changed, 12 insertions, 9 deletions
diff --git a/usr.bin/gprof/alpha.h b/usr.bin/gprof/alpha.h index 067e019..823d656 100644 --- a/usr.bin/gprof/alpha.h +++ b/usr.bin/gprof/alpha.h @@ -31,6 +31,7 @@ * SUCH DAMAGE. * * @(#)i386.h 8.1 (Berkeley) 6/6/93 + * $FreeBSD$ */ /* @@ -38,7 +39,6 @@ * (see asgnsamples for use and explanation.) */ #define OFFSET_OF_CODE 0 -#define UNITS_TO_CODE (OFFSET_OF_CODE / sizeof(UNIT)) enum opermodes { dummy }; typedef enum opermodes operandenum; diff --git a/usr.bin/gprof/amd64.h b/usr.bin/gprof/amd64.h index 067e019..823d656 100644 --- a/usr.bin/gprof/amd64.h +++ b/usr.bin/gprof/amd64.h @@ -31,6 +31,7 @@ * SUCH DAMAGE. * * @(#)i386.h 8.1 (Berkeley) 6/6/93 + * $FreeBSD$ */ /* @@ -38,7 +39,6 @@ * (see asgnsamples for use and explanation.) */ #define OFFSET_OF_CODE 0 -#define UNITS_TO_CODE (OFFSET_OF_CODE / sizeof(UNIT)) enum opermodes { dummy }; typedef enum opermodes operandenum; diff --git a/usr.bin/gprof/gprof.c b/usr.bin/gprof/gprof.c index 79dafc7..4ba5e1e 100644 --- a/usr.bin/gprof/gprof.c +++ b/usr.bin/gprof/gprof.c @@ -48,6 +48,8 @@ static const char rcsid[] = #include <err.h> #include "gprof.h" +#define UNITS_TO_CODE (OFFSET_OF_CODE / sizeof(UNIT)) + static int valcmp(const void *, const void *); diff --git a/usr.bin/gprof/gprof.h b/usr.bin/gprof/gprof.h index ee0976e..4d2b949 100644 --- a/usr.bin/gprof/gprof.h +++ b/usr.bin/gprof/gprof.h @@ -87,6 +87,8 @@ typedef int64_t UNIT; #else typedef u_short UNIT; /* unit of profiling */ #endif +#define UNITS_TO_CODE (OFFSET_OF_CODE / sizeof(UNIT)) + char *a_outname; #define A_OUTNAME "a.out" diff --git a/usr.bin/gprof/hp300.h b/usr.bin/gprof/hp300.h index 15b9597..37e6350 100644 --- a/usr.bin/gprof/hp300.h +++ b/usr.bin/gprof/hp300.h @@ -31,6 +31,7 @@ * SUCH DAMAGE. * * @(#)hp300.h 8.1 (Berkeley) 6/6/93 + * $FreeBSD$ */ /* @@ -38,7 +39,6 @@ * (see asgnsamples for use and explanation.) */ #define OFFSET_OF_CODE 0 -#define UNITS_TO_CODE (OFFSET_OF_CODE / sizeof(UNIT)) enum opermodes { dummy }; typedef enum opermodes operandenum; diff --git a/usr.bin/gprof/i386.h b/usr.bin/gprof/i386.h index 067e019..823d656 100644 --- a/usr.bin/gprof/i386.h +++ b/usr.bin/gprof/i386.h @@ -31,6 +31,7 @@ * SUCH DAMAGE. * * @(#)i386.h 8.1 (Berkeley) 6/6/93 + * $FreeBSD$ */ /* @@ -38,7 +39,6 @@ * (see asgnsamples for use and explanation.) */ #define OFFSET_OF_CODE 0 -#define UNITS_TO_CODE (OFFSET_OF_CODE / sizeof(UNIT)) enum opermodes { dummy }; typedef enum opermodes operandenum; diff --git a/usr.bin/gprof/ia64.h b/usr.bin/gprof/ia64.h index 8e925b3..823d656 100644 --- a/usr.bin/gprof/ia64.h +++ b/usr.bin/gprof/ia64.h @@ -39,7 +39,6 @@ * (see asgnsamples for use and explanation.) */ #define OFFSET_OF_CODE 0 -#define UNITS_TO_CODE (OFFSET_OF_CODE / sizeof(UNIT)) enum opermodes { dummy }; typedef enum opermodes operandenum; diff --git a/usr.bin/gprof/mips.h b/usr.bin/gprof/mips.h index cd67a43..7a48afa 100644 --- a/usr.bin/gprof/mips.h +++ b/usr.bin/gprof/mips.h @@ -37,6 +37,7 @@ * @(#)mips.h 8.1 (Berkeley) 6/6/93 * * From: @(#)sparc.h 5.1 (Berkeley) 7/8/92 + * $FreeBSD$ */ /* @@ -44,7 +45,6 @@ * (see asgnsamples for use and explanation.) */ #define OFFSET_OF_CODE 0 -#define UNITS_TO_CODE (OFFSET_OF_CODE / sizeof(UNIT)) enum opermodes { dummy }; typedef enum opermodes operandenum; diff --git a/usr.bin/gprof/sparc.h b/usr.bin/gprof/sparc.h index e2455ea..856e6ad2 100644 --- a/usr.bin/gprof/sparc.h +++ b/usr.bin/gprof/sparc.h @@ -35,6 +35,7 @@ * SUCH DAMAGE. * * @(#)sparc.h 8.1 (Berkeley) 6/6/93 + * $FreeBSD$ */ /* @@ -42,7 +43,6 @@ * (see asgnsamples for use and explanation.) */ #define OFFSET_OF_CODE 0 -#define UNITS_TO_CODE (OFFSET_OF_CODE / sizeof(UNIT)) enum opermodes { dummy }; typedef enum opermodes operandenum; diff --git a/usr.bin/gprof/tahoe.h b/usr.bin/gprof/tahoe.h index d82359a..0a63975 100644 --- a/usr.bin/gprof/tahoe.h +++ b/usr.bin/gprof/tahoe.h @@ -31,6 +31,7 @@ * SUCH DAMAGE. * * @(#)tahoe.h 8.1 (Berkeley) 6/6/93 + * $FreeBSD$ */ /* @@ -43,7 +44,6 @@ * (see asgnsamples for use and explanation.) */ #define OFFSET_OF_CODE 2 -#define UNITS_TO_CODE (OFFSET_OF_CODE / sizeof(UNIT)) /* * register for pc relative addressing diff --git a/usr.bin/gprof/vax.h b/usr.bin/gprof/vax.h index 33c5822..cb24524 100644 --- a/usr.bin/gprof/vax.h +++ b/usr.bin/gprof/vax.h @@ -31,6 +31,7 @@ * SUCH DAMAGE. * * @(#)vax.h 8.1 (Berkeley) 6/6/93 + * $FreeBSD$ */ /* @@ -43,7 +44,6 @@ * (see asgnsamples for use and explanation.) */ #define OFFSET_OF_CODE 2 -#define UNITS_TO_CODE (OFFSET_OF_CODE / sizeof(UNIT)) /* * register for pc relative addressing |