diff options
author | bde <bde@FreeBSD.org> | 1996-12-13 12:46:28 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1996-12-13 12:46:28 +0000 |
commit | be904e56d59e6070063e1e9193e57203632b448d (patch) | |
tree | be8ed8140e5d32127248bace4b1b1f022297a196 | |
parent | 70b4f8641ffc5741e665c1e5377f766559196b4a (diff) | |
download | FreeBSD-src-be904e56d59e6070063e1e9193e57203632b448d.zip FreeBSD-src-be904e56d59e6070063e1e9193e57203632b448d.tar.gz |
Moved nonstandard compiler profiling options out of config. Just print
the profiling level in config and decide what to do in makefiles.
Makefile.i386:
Align functions to 16-byte boundaries if profiling is enabled. This
will allow a fourfold reduction in the size of the profiling buffers.
-rw-r--r-- | sys/conf/Makefile.i386 | 9 | ||||
-rw-r--r-- | sys/conf/Makefile.powerpc | 9 | ||||
-rw-r--r-- | sys/i386/conf/Makefile.i386 | 9 | ||||
-rw-r--r-- | usr.sbin/config/mkmakefile.c | 10 |
4 files changed, 28 insertions, 9 deletions
diff --git a/sys/conf/Makefile.i386 b/sys/conf/Makefile.i386 index 8bccdc0..0ea2c52 100644 --- a/sys/conf/Makefile.i386 +++ b/sys/conf/Makefile.i386 @@ -1,7 +1,7 @@ # Makefile.i386 -- with config changes. # Copyright 1990 W. Jolitz # from: @(#)Makefile.i386 7.1 5/10/91 -# $Id: Makefile.i386,v 1.89 1996/10/08 22:08:44 bde Exp $ +# $Id: Makefile.i386,v 1.90 1996/11/06 14:56:11 bde Exp $ # # Makefile for FreeBSD # @@ -37,6 +37,13 @@ INCLUDES+= -I/usr/include COPTS= ${INCLUDES} ${IDENT} -DKERNEL CFLAGS= ${COPTFLAGS} ${CWARNFLAGS} ${DEBUG} ${COPTS} LOAD_ADDRESS?= F0100000 +.if defined(PROF) +PROF+= -malign-functions=4 +.if ${PROFLEVEL} >= 2 +IDENT+= -DGPROF4 -DGUPROF +PROF+= -mprofiler-epilogue +.endif +.endif NORMAL_C= ${CC} -c ${CFLAGS} ${PROF} $< NORMAL_C_C= ${CC} -c ${CFLAGS} ${PROF} ${PARAM} $< diff --git a/sys/conf/Makefile.powerpc b/sys/conf/Makefile.powerpc index 8bccdc0..0ea2c52 100644 --- a/sys/conf/Makefile.powerpc +++ b/sys/conf/Makefile.powerpc @@ -1,7 +1,7 @@ # Makefile.i386 -- with config changes. # Copyright 1990 W. Jolitz # from: @(#)Makefile.i386 7.1 5/10/91 -# $Id: Makefile.i386,v 1.89 1996/10/08 22:08:44 bde Exp $ +# $Id: Makefile.i386,v 1.90 1996/11/06 14:56:11 bde Exp $ # # Makefile for FreeBSD # @@ -37,6 +37,13 @@ INCLUDES+= -I/usr/include COPTS= ${INCLUDES} ${IDENT} -DKERNEL CFLAGS= ${COPTFLAGS} ${CWARNFLAGS} ${DEBUG} ${COPTS} LOAD_ADDRESS?= F0100000 +.if defined(PROF) +PROF+= -malign-functions=4 +.if ${PROFLEVEL} >= 2 +IDENT+= -DGPROF4 -DGUPROF +PROF+= -mprofiler-epilogue +.endif +.endif NORMAL_C= ${CC} -c ${CFLAGS} ${PROF} $< NORMAL_C_C= ${CC} -c ${CFLAGS} ${PROF} ${PARAM} $< diff --git a/sys/i386/conf/Makefile.i386 b/sys/i386/conf/Makefile.i386 index 8bccdc0..0ea2c52 100644 --- a/sys/i386/conf/Makefile.i386 +++ b/sys/i386/conf/Makefile.i386 @@ -1,7 +1,7 @@ # Makefile.i386 -- with config changes. # Copyright 1990 W. Jolitz # from: @(#)Makefile.i386 7.1 5/10/91 -# $Id: Makefile.i386,v 1.89 1996/10/08 22:08:44 bde Exp $ +# $Id: Makefile.i386,v 1.90 1996/11/06 14:56:11 bde Exp $ # # Makefile for FreeBSD # @@ -37,6 +37,13 @@ INCLUDES+= -I/usr/include COPTS= ${INCLUDES} ${IDENT} -DKERNEL CFLAGS= ${COPTFLAGS} ${CWARNFLAGS} ${DEBUG} ${COPTS} LOAD_ADDRESS?= F0100000 +.if defined(PROF) +PROF+= -malign-functions=4 +.if ${PROFLEVEL} >= 2 +IDENT+= -DGPROF4 -DGUPROF +PROF+= -mprofiler-epilogue +.endif +.endif NORMAL_C= ${CC} -c ${CFLAGS} ${PROF} $< NORMAL_C_C= ${CC} -c ${CFLAGS} ${PROF} ${PARAM} $< diff --git a/usr.sbin/config/mkmakefile.c b/usr.sbin/config/mkmakefile.c index 0f057f4..7becfc8 100644 --- a/usr.sbin/config/mkmakefile.c +++ b/usr.sbin/config/mkmakefile.c @@ -157,10 +157,8 @@ makefile() } fprintf(ofp, "KERN_IDENT=%s\n", raise(ident)); fprintf(ofp, "IDENT="); - if (profiling >= 1) + if (profiling) fprintf(ofp, " -DGPROF"); - if (profiling >= 2) - fprintf(ofp, " -DGPROF4 -DGUPROF"); if (cputype == 0) { printf("cpu type must be specified\n"); @@ -204,10 +202,10 @@ makefile() fprintf(ofp, "%s=%s\n", op->op_name, op->op_value); if (debugging) fprintf(ofp, "DEBUG=-g\n"); - if (profiling >= 1) + if (profiling) { fprintf(ofp, "PROF=-pg\n"); - if (profiling >= 2) - fprintf(ofp, "PROF+=-mprofiler-epilogue\n"); + fprintf(ofp, "PROFLEVEL=%d\n", profiling); + } while (fgets(line, BUFSIZ, ifp) != 0) { if (*line != '%') { fprintf(ofp, "%s", line); |