This is the mail archive of the
mailing list for the GCC project.
Re: basic-block and profile-based optimizing (was Re: New attribute"infrequent"?)
- To: Andreas Jaeger <aj at suse dot de>
- Subject: Re: basic-block and profile-based optimizing (was Re: New attribute"infrequent"?)
- From: Scott A Crosby <crosby at qwes dot math dot cmu dot edu>
- Date: Fri, 31 Aug 2001 14:05:54 -0400 (EDT)
- cc: John Levon <moz at compsoc dot man dot ac dot uk>, <gcc at gcc dot gnu dot org>
On Fri, 31 Aug 2001, Andreas Jaeger wrote:
> You cannot profile accuratly the C library. It can be profiled - but
> I don't expect that it's realistic:
> - What kind of application will you use? This needs to be a
> self-written application that calls all calls with typical
Would not use the normal applications?
netscape, X-windows, mutt, pine, cmucl, lapack, gcc, squid.
And, put in announcement for such a profile-optimized libc a request that
if anyone has a program that runs slower or spends an inordinate time in
libc, that that the author profile libc when running their program and
> - How will you handle exceptional stuff? Should those be called by
> the special application? For example should strerror be called - or
> - There're plenty of different types of applications and it's
> difficult to model even some of them.
> For some small libraries you might get good results but not for
> something complex like the GNU C library,
A profile-based optimized libc could pessimize any type of application
who's dynamic behaivor is different from the the applications used to
generate the statistics. But, that caveat applies to just about any
optimization: there will be some things for which a particular
The question is whether the benefits outweigh the costs, or more
importantly, can the costs be minimized further.