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:


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.)

SPEC CPU2000 is not likely to be a big winner for reordering fuctions. There are small sections of code that consume most of the excution time for most of the benchmarks. Bigger winners are going to be code where things do not fit neatly into a cache or a limited number of pages, e.g. code using many shared libraries.


On some versions of the Pentium III there are only 32 instruction TLB entries, each for a 4K page. That isn't going to go very far when there are over 100 shared libraries mapped as in the case of openoffice. Each library has to be on a separate page.

-Will


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