This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH: Fix missing newline in timevar_print()
- To: Ira Ruben <ira at apple dot com>
- Subject: Re: PATCH: Fix missing newline in timevar_print()
- From: Zack Weinberg <zack at codesourcery dot com>
- Date: Fri, 28 Sep 2001 17:42:04 -0700
- Cc: gcc-patches at gcc dot gnu dot org
- References: <p05100301b7dab7a4e237@[17.202.44.152]>
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