This is the mail archive of the gcc-patches@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: PATCH: improved performance timing


On Thu, Apr 27, 2000 at 06:40:33PM -0700, Richard Henderson wrote:
> On Thu, Apr 27, 2000 at 05:52:14PM -0700, Alex Samuel wrote:
> > This patch replaces the TIMEVAR macro with a more flexible tool for
> > measuring runtime performance of various parts of the compiler.
> 
> Good stuff.  Couple o suggestions:
> 
> (1) If quiet_flag, don't make the system call.  Don't do anything.
>     In fact, perhaps use a macro and avoid the function call altogether,
>     then use __builtin_expect (if available) to predict the call not taken.
> 
>     We make about 10000 such unneeded system calls while compiling
>     insn-attrtab.c, for example.  We'd had this optimization in
>     the old code.

Somebody also might think about optionally using machine dependent timers and
avoid all time system calls, while being more accurate.

> (2) Cache freed timevar_stack_def entries.  Virtually every pop is
>     immediately followed by a another push.  This would probably
>     eliminate all of the added memory management overhead.
> 
> (3) Don't print timers that were never started.  This eliminates
>     useless noise about eg TV_REG_STACK taking zero time on every
>     machine except x86.

-- 
Michael Meissner, Cygnus Solutions, a Red Hat company.
PMB 198, 174 Littleton Road #3, Westford, Massachusetts 01886, USA
Work:	  meissner@redhat.com		phone: +1 978-486-9304
Non-work: meissner@spectacle-pond.org	fax:   +1 978-692-4482

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