This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: profile-driven optimization and the linker?


Dan Kegel wrote:
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:

One more example: mozilla does something like this (driven not by gprof, but by some other execution trace analyzer); the perl script that generates the linker script, along with other interesting stuff, is the last attachment to https://bugzilla.mozilla.org/show_bug.cgi?id=65845 - Dan

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]