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: Fix missing newline in timevar_print()


On Fri, Sep 28, 2001 at 04:29:08PM -0700, Ira Ruben wrote:
> Below is a trivial patch to a minor problem I just found in timevar.c 
> (might as well report/fix 'em as I find 'em).  In timevar.c, When 
> HAVE_TIMES is not defined then HAVE_WALL_TIME is not defined.  If 
> HAVE_WALL_TIME is not defined then timevar_print() doesn't output a 
> newline at the end of it's display.  So I just moved the newline out 
> from under the #ifdef's.

This seems like a reasonable change, although I am not allowed to
approve it.  Minor suggestion:

>     fprintf (fp, "%7.2f          ", total->sys);

You'll be getting a bunch of trailing blanks on each line with no
HAVE_WALL_TIME.  This could e.g. confuse someone trying to use '$' in
a grep expression.  Would you mind moving the blanks from the end of
the ->user and ->sys printouts, to the beginnings of the ->sys and
->wall printouts?  (All three possible methods get you user time, so
you needn't worry about the display being shifted right in that case.)

> 	* (timevar_print) Move '\n' to it's own putc.

You want "its" here.

zw


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