Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 30 Nov 2007 09:43:37 +1100 (EST)
From:      Bruce Evans <brde@optusnet.com.au>
To:        Peter Jeremy <peterjeremy@optushome.com.au>
Cc:        cvs-src@freebsd.org, src-committers@freebsd.org, Bruce Evans <bde@freebsd.org>, cvs-all@freebsd.org
Subject:   Re: cvs commit: src/sys/i386/isa prof_machdep.c src/sys/amd64/amd64 prof_machdep.c
Message-ID:  <20071130085815.S11296@delplex.bde.org>
In-Reply-To: <20071129182810.GV50167@server.vk2pj.dyndns.org>
References:  <200711290115.lAT1F3hS077036@repoman.freebsd.org> <20071129182810.GV50167@server.vk2pj.dyndns.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 30 Nov 2007, Peter Jeremy wrote:

> On Thu, Nov 29, 2007 at 01:15:03AM +0000, Bruce Evans wrote:
>>  Remove entry points for -finstrument functions since they are currently
>>  unused except to obfuscate disassemblies.  -mprofiler-epilogue is
>>  currently with gcc-4 (it does too little), but -finstrument-functions
>            ^  There is a word missing here and I'm not sure if it is
> 'unused' or 'broken'.  Could you please clarify.
>>  is broken in a different way (it does too much).

Oops, the word is `broken':
- gcc rearranged the initialization again, so -mprofiler-epilogue has no
   effect except for its old bug of emitting bogus ".globl .mexitcount"
   declarations.
- -mprofiler-epilogue is still supported and used in kernel mk files,
   but its documentation has been lost.

-finstrument-functions works better than in gcc-3.6, but is still
almost unusuable since it emits calls to the Cygnus profiling functions
for every inline function.  In gcc-3.6, it failed to inline anything.
Now it inlines things normally except for emitting the profiling calls
before and after the inlined calls.  So a 1-instruction inline function
for loading curthread, say, grows overhead of 2 function calls plus
parameter passing for these.  Profiling of inline functions is useful
as an option but not as a default.  It can be controlled per-function
using an attribute, but I don't know of any global option to turn it
off for just inline functions.

Bruce



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20071130085815.S11296>