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]

Re: basic-block and profile-based optimizing (was Re: New attribute"infrequent"?)


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
>   arguments.

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
submit it.

> - How will you handle exceptional stuff?  Should those be called by
>   the special application?  For example should strerror be called - or
>   not?
> - 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
optimization hurts.

The question is whether the benefits outweigh the costs, or more
importantly, can the costs be minimized further.

Scott



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