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: some profiling numbers


On Wednesday, June 25, 2003, at 1:39 PM, graydon hoare wrote:

hi,

I've recently done some profiling and analysis of gcc and g++, using the oprofile hardware-assisted profiling module in linux 2.5. I collected stats on a variety of versions of gcc (some only of historical interest) and some different branches and workloads, and characterized some aspects of the cache and branch-mispredict penalties in addition to cycle hotspots.

the results of the work are posted at
     http://people.redhat.com/graydon/gcc-optimizing/
 and http://people.redhat.com/graydon/g++-report/

any comments or questions are welcome (including instructions and hand-holding on how to set up the profiler for your own runs, if you want to do more of this stuff).

In your c++ report, you site side_effects_p to have a large number of branch mispredicts but
there is another problem you did not see, there are invariant loads in the 'E' loop as each
time through the loop you have to load XVECLEN (x, i) and XVEC (x, i) for XVECEXP (x, i, j).
There are large number of places this happens too.
In comp_template_args there is an invariant load of TREE_VEC_LENGTH (oldargs).
These fixes are simple and by making sure there is no extra loads in the loop
(but this fix might hurt on x86 but x86 is the old case since there are not enough
registers to do anything useful to speed up by removing invariant load).


I used Shark from the CHUD tools on Mac OS X to see that these are important fixes and should be fixed.
Also I will look at mispredicted branches on my G4 laptop to see if I get anything different, I think
I will but who knows.


Thanks,
Andrew Pinski


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