-DNOPROFILE with make buildworld...
cswiger at mac.com
Tue Jun 21 18:24:39 GMT 2005
Roland Smith wrote:
> On Tue, Jun 21, 2005 at 01:49:06PM +0100, Harrison Peter CSA BIRKENHEAD wrote:
>>I've cvsup'ed my source tree, and stepping through the instructions in
>>the handbook I note that it recommends running make buildworld with
>>-DNOPROFILE (or specifying it in make.conf). I'm not clear what the
>>impact of running profiled libraries is against non-profiled
>>libraries. I've done a quick search via google and through the list
>>archives without success.
Normally, you don't use the profiled versions of libraries unless you are
running a binary which links against them. If you are running a binary which
has not been compiled with profiling, the toolchain will link it against normal
versions of the libraries.
[ ... ]
> Programs that have been compiled with profiling enabled might run
> fractionally slower that without. But I doubt the difference is
> significant on a modern machine.
The amount of overhead seems to vary by platform, but it's generally only a
couple of percent. Not very significant, but maybe noticable.
The major downsides to having profiled libraries around is that they use more
disk space than normal versions, and it takes longer to do a buildworld, but
the runtime performance of the system for normal binaries will not be affected.
> I'll be bold and say that modern machines are so fast that there is
> seldom need to profile a program.
Even people who write code on fast machines may run that code on slower boxes
sometime. However, what you've said is still true: there is seldom need to
profile a program. Get it working well enough that it doesn't leak memory, and
then worry about profiling it. :-)
More information about the freebsd-questions