diff options
author | bde <bde@FreeBSD.org> | 2002-07-13 22:28:34 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 2002-07-13 22:28:34 +0000 |
commit | 61e58ad58c5e1a0abd7f2fb47bd3446e120a38ae (patch) | |
tree | 5f9c415297fbfd3a4696401e06fbf9cdf4332536 /sys/conf/kern.pre.mk | |
parent | de5af3fe19c0dff0cfb3c6e68d0520e4d5a1d226 (diff) | |
download | FreeBSD-src-61e58ad58c5e1a0abd7f2fb47bd3446e120a38ae.zip FreeBSD-src-61e58ad58c5e1a0abd7f2fb47bd3446e120a38ae.tar.gz |
Quick fix for high resolution kernel profiling on i386's. Use
-finstrument-functions instead of -mprofiler-epilogue. The former
works essentially the same as the latter but has a higher overhead
(about 22 more bytes per function for passing unused args to the
profiling functions).
Removed all traces of the IDENT Makefile variable, which had been
reduced to just a place for holding profiling's contribution to CFLAGS
(the IDENT that gives the kernel identity was renamed to KERN_IDENT).
Diffstat (limited to 'sys/conf/kern.pre.mk')
-rw-r--r-- | sys/conf/kern.pre.mk | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/sys/conf/kern.pre.mk b/sys/conf/kern.pre.mk index 3e213c7..3a83c70 100644 --- a/sys/conf/kern.pre.mk +++ b/sys/conf/kern.pre.mk @@ -38,7 +38,7 @@ INCLUDES+= -I$S/../include INCLUDES+= -I/usr/include .endif -COPTS= ${INCLUDES} ${IDENT} -D_KERNEL -include opt_global.h +COPTS= ${INCLUDES} -D_KERNEL -include opt_global.h CFLAGS= ${COPTFLAGS} ${CWARNFLAGS} ${DEBUG} ${COPTS} -fno-common # XXX LOCORE means "don't declare C stuff" not "for locore.s". @@ -50,18 +50,16 @@ ASM_CFLAGS= -x assembler-with-cpp -DLOCORE ${CFLAGS} CFLAGS+= ${FMT} .if defined(PROFLEVEL) && ${PROFLEVEL} >= 1 -IDENT= -DGPROF -PROF= -pg -.endif - -DEFINED_PROF= ${PROF} -.if defined(PROF) -CFLAGS+= -falign-functions=16 +CFLAGS+= -DGPROF -falign-functions=16 .if ${PROFLEVEL} >= 2 -IDENT+= -DGPROF4 -DGUPROF -PROF+= -mprofiler-epilogue +CFLAGS+= -DGPROF4 -DGUPROF +# XXX -Wno-inline is to break some warnings. +PROF= -finstrument-functions -Wno-inline +.else +PROF= -pg .endif .endif +DEFINED_PROF= ${PROF} .if defined(NO_WERROR) WERROR= |