This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils 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: Linker support for -freorder-functions?


> On Thu, Aug 05, 2004 at 03:02:27PM -0700, Mike Stump wrote:
> > On Aug 5, 2004, at 1:58 PM, H. J. Lu wrote:
> > >But it is useless without linker support. Should linker group
> > >text.hot/text.unlikely like
> > >
> > >*(.text.hot)
> > >*(.text .stub${RELOCATING+ .text.* .gnu.linkonce.t.*})
> > >KEEP (*(.text.*personality*))
> > >*(.text.unlikely)
> > 
> > Seems almost reasonable from my humble perspective...  though, hot 
> > would be all together in the .text.* area...  so, listing it first 
> > isn't strictly necessary....  and, likewise, unlikely would tend to 
> > group together as well, so strictly speaking, listing it last should 
> > not be necessary...
> 
> I was wondering what the reasonable memory layout for this is. I
> don't think you want .text.unlikely to be next to .text.hot.

I originally had similar patch, but apparently didn't managed to push it
out, because at least on the Athlon machine I originally tested the
patch on, the changes in memory layout didn't produce any improvements
on SPECs.  Major benefits came from grouping .text.hot functions
together (about 0.8% if I recall correctly) that ahpepnt on the
unpatched binutils too.  But on other architectures, especially those
where jump distance matters it would ineed make sense to force the
layout tobe sane.  Thanks for looking into this.

Honza


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