From owner-cvs-all@FreeBSD.ORG Thu Nov 29 22:43:57 2007 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0ED6D16A419; Thu, 29 Nov 2007 22:43:57 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail12.syd.optusnet.com.au (mail12.syd.optusnet.com.au [211.29.132.193]) by mx1.freebsd.org (Postfix) with ESMTP id 9629413C44B; Thu, 29 Nov 2007 22:43:56 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from c211-30-219-213.carlnfd3.nsw.optusnet.com.au (c211-30-219-213.carlnfd3.nsw.optusnet.com.au [211.30.219.213]) by mail12.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id lATMhgQj005011 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 30 Nov 2007 09:43:44 +1100 Date: Fri, 30 Nov 2007 09:43:37 +1100 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: Peter Jeremy In-Reply-To: <20071129182810.GV50167@server.vk2pj.dyndns.org> Message-ID: <20071130085815.S11296@delplex.bde.org> References: <200711290115.lAT1F3hS077036@repoman.freebsd.org> <20071129182810.GV50167@server.vk2pj.dyndns.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: cvs-src@freebsd.org, src-committers@freebsd.org, Bruce Evans , cvs-all@freebsd.org Subject: Re: cvs commit: src/sys/i386/isa prof_machdep.c src/sys/amd64/amd64 prof_machdep.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Nov 2007 22:43:57 -0000 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