diff options
author | bde <bde@FreeBSD.org> | 2006-10-26 15:16:43 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 2006-10-26 15:16:43 +0000 |
commit | e542a37bc4edb19c3383d8ef6f823c3792dbe259 (patch) | |
tree | 48a0f62ad07e5bfcbf147bd72cffc85c512514c9 /sys/conf/kern.pre.mk | |
parent | 33638419eac25821429642d4f2e2b447836295d9 (diff) | |
download | FreeBSD-src-e542a37bc4edb19c3383d8ef6f823c3792dbe259.zip FreeBSD-src-e542a37bc4edb19c3383d8ef6f823c3792dbe259.tar.gz |
Fixed high resolution profiling on arches that support it (amd64 and
i386). Use -mprofiler-epilogue again, and don't use -finstrument-functions.
The former has been fixed for arches that implement high-res profiling,
and the latter has been useless for kernel profiling since gcc-3.4
when it started forcing -fno-inline. -fno-inline gives a kernel with
performance characteristics too different from a normal kernel to be
worth profiling, by turning off inlining of all the little optimized
functions in headers. This interacts especially badly with FreeBSD's
use of "static inline" for all inlines in headers, by creating many
separate copies of the little functions, so not inlining tends to
increase cache pressure where it should reduce it, and (since gprof(1)
doesn't understand the copies) the statistics for the little functions
are hard to interpret even if you want them.
Diffstat (limited to 'sys/conf/kern.pre.mk')
-rw-r--r-- | sys/conf/kern.pre.mk | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/conf/kern.pre.mk b/sys/conf/kern.pre.mk index fd8e830..5206526 100644 --- a/sys/conf/kern.pre.mk +++ b/sys/conf/kern.pre.mk @@ -100,7 +100,7 @@ ASM_CFLAGS= -x assembler-with-cpp -DLOCORE ${CFLAGS} CFLAGS+= -DGPROF -falign-functions=16 .if ${PROFLEVEL} >= 2 CFLAGS+= -DGPROF4 -DGUPROF -PROF= -finstrument-functions -Wno-inline +PROF= -pg -mprofiler-epilogue .else PROF= -pg .endif |