some profiling numbers
Zack Weinberg
zack@codesourcery.com
Wed Jun 25 21:41:00 GMT 2003
graydon hoare <graydon@redhat.com> writes:
> 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.
This is very interesting stuff, thanks for doing it. A few comments:
- If you haven't already, please make sure all the internal
consistency checks are disabled, by specifying --disable-checking to
configure. Large amounts of time spent in memset() is
characteristic of profiling with the internal consistency checks
enabled (although there are other sources of excessive use of
memset). Release branch GCC always has the checking turned off; if
you profile the mainline with it on you are not making a fair
comparison.
- You call out the preprocessor (cpp*.c) as a source of additional
code between 2.95 and 3.0, but this is not entirely fair, because
all the same work was being done in 2.95 but in a separate
executable. I would like to see higher level information about time
spent in *all* the programs run in the course of a kernel build -- I
believe oprofile is ideally suited to collecting such information.
(It looks like this information is in the first few charts at the
top of the report, but not in others.)
- bison.simple being at the top of the 2.95->3.0 code-bloat chart is
kind of suspicious; could you please make sure that all your test
compilers generated c-parse.c with the exact same version of bison?
I believe 1.35 and later work with 2.95 and later.
- Could we get that same code-bloat chart with information about 3.1,
3.2, 3.3 and mainline? I suspect the problem spots may be rather
different by now.
- And would it be possible to go into a bit more detail about the
problem routines in each of these files?
zw
More information about the Gcc
mailing list