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.
This commit is contained in:
parent
7f782006b9
commit
c08d58eade
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=20395
@ -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} $<
|
||||
|
@ -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} $<
|
||||
|
@ -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} $<
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user