From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27299 invoked by alias); 26 Nov 2004 05:08:52 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 26423 invoked from network); 26 Nov 2004 05:08:40 -0000 Received: from unknown (HELO sccrmhc13.comcast.net) (204.127.202.64) by sourceware.org with SMTP; 26 Nov 2004 05:08:40 -0000 Received: from [192.168.123.1] (c-24-126-73-164.we.client2.attbi.com[24.126.73.164]) by comcast.net (sccrmhc13) with ESMTP id <20041126050839016001k6rne>; Fri, 26 Nov 2004 05:08:40 +0000 Message-ID: <41A6AC41.7000305@kegel.com> Date: Fri, 26 Nov 2004 06:19:00 -0000 From: Dan Kegel User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040913 MIME-Version: 1.0 To: law@redhat.com CC: GCC Mailing List , bastian@kde.org Subject: Re: profile-driven optimization and the linker? References: <41A620F5.5040209@kegel.com> <1101412168.13475.19.camel@localhost.localdomain> <41A63996.1020407@kegel.com> <1101419643.13475.69.camel@localhost.localdomain> In-Reply-To: <1101419643.13475.69.camel@localhost.localdomain> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2004-11/txt/msg01012.txt.bz2 I went looking for instances of people using gprof's --function-ordering option, but came up fairly empty handed. Anyone have good references? Here's the little bit I dug up: Ben's post just now was pretty good, even though that was for data and not code: http://gcc.gnu.org/ml/gcc/2004-11/msg01002.html Did reordering the global variables end up helping performance on any interesting tasks? http://gcc.gnu.org/ml/gcc-patches/2001-11/msg00935.html says "Steve Christiansen tried using gprof output to create a linker script that orders functions based on run-time call graphs and call counts, but couldn't show that it made a difference, based on SPEC CPU2000 results." (Since the --function-ordering option was added to gprof at the end of 1995, I imagine Steve Christiansen used it. On the other hand, since glibc aborted with more than 64K symbols when run with -pg until late 2002, maybe he ran into trouble there.) http://vr3.uid0.sk/cd/Mailinglist_Archives/agenda-mail/agenda-user/200107/995378424.txt says Jay Carlson gave it a try, but doesn't have any results. http://sources.redhat.com/binutils/docs-2.15/ld/Input-Section.html#Input%20Section describes (just barely) how one writes a linker script to map a given list of input sections to an output section. That plus gcc's -ffunction-sections option are probably needed to use this. - Dan -- Trying to get a job as a c++ developer? See http://kegel.com/academy/getting-hired.html