Re: Pgcc in Deb
Martijn van Oosterhout <email@example.com> writes:
> I remember reading something about gcc having an option that would
> insert code to profile all the branches in a programs and save that
> data to disk. Then, next time you compiled it would read this data
> in and use it to decide how to arrange the code within a function
> Unfortunatly I can't find any reference to it right now.
`-fprofile-arcs' will compile a program instrumented to save this
information, and `-fbranch-probabilities' will use that to tell the
CPU what the probable outcome of each conditional branch will be.
The problem here is that you'll need some pretty "typical" testing
(preferable automatic) or else the profile data will be suspect (as is
the case with all profiling).
All in all, it is much work and the returns are probably pretty slim.
> The next level up is to analyse the call structure of a whole program
> and rearrange all the functions so that functions that call eachother
> tend to be near one another, [...]
> Apparently SGI has a tool that does this and someone was writing a
> GPL'd version called Grope. Unfortunatly I can't find anything about
> that either.
You're probably talking about GNU Rope. <URL:http://grope.nat.org/>
should be the canonical URL, but at the time of writing, it was down.
- Re: Pgcc in Deb
- From: Martijn van Oosterhout <firstname.lastname@example.org>