Patchwork PATCH TRUNK: better format output for time reports.

login
register
mail settings
Submitter Basile Starynkevitch
Date June 25, 2011, 6:40 a.m.
Message ID <20110625084020.c15d5c5d.basile@starynkevitch.net>
Download mbox | patch
Permalink /patch/101939/
State New
Headers show

Comments

Basile Starynkevitch - June 25, 2011, 6:40 a.m.
Hello All,

When cc1 report timing, the timing variable name has a too short width for df reg dead/unused notes:

Execution times (seconds)
 phase setup           :   0.00 ( 0%) usr   0.00 ( 0%) sys   0.01 ( 0%) wall    1089 kB ( 1%) ggc
 trivially dead code   :   0.02 ( 1%) usr   0.00 ( 0%) sys   0.03 ( 1%) wall       0 kB ( 0%) ggc
 df scan insns         :   0.07 ( 2%) usr   0.00 ( 0%) sys   0.11 ( 2%) wall      42 kB ( 0%) ggc
 df live regs          :   0.00 ( 0%) usr   0.00 ( 0%) sys   0.03 ( 1%) wall       0 kB ( 0%) ggc
 df reg dead/unused notes:   0.02 ( 1%) usr   0.00 ( 0%) sys   0.02 ( 0%) wall    1395 kB ( 1%) ggc
 register information  :   0.00 ( 0%) usr   0.00 ( 0%) sys   0.01 ( 0%) wall       0 kB ( 0%) ggc
 alias analysis        :   0.01 ( 0%) usr   0.00 ( 0%) sys   0.00 ( 0%) wall     393 kB ( 0%) ggc
 rebuild jump labels   :   0.01 ( 0%) usr   0.00 ( 0%) sys   0.02 ( 0%) wall       0 kB ( 0%) ggc
 preprocessing         :   0.11 ( 3%) usr   0.10 (16%) sys   0.39 ( 8%) wall   11550 kB (10%) ggc
 lexical analysis      :   0.02 ( 1%) usr   0.11 (17%) sys   0.31 ( 7%) wall       0 kB ( 0%) ggc

The following trivial patch should fix that:
####### patch against trunk 175201
####### gcc/ChangeLog entry
2011-06-25  Basile Starynkevitch  <basile@starynkevitch.net>

	* timevar.c (timevar_print): Increase width for display of timevar name.
#######

Ok for trunk?

Regards
Richard Guenther - June 25, 2011, 9:38 a.m.
On Sat, Jun 25, 2011 at 8:40 AM, Basile Starynkevitch
<basile@starynkevitch.net> wrote:
> Hello All,
>
> When cc1 report timing, the timing variable name has a too short width for df reg dead/unused notes:
>
> Execution times (seconds)
>  phase setup           :   0.00 ( 0%) usr   0.00 ( 0%) sys   0.01 ( 0%) wall    1089 kB ( 1%) ggc
>  trivially dead code   :   0.02 ( 1%) usr   0.00 ( 0%) sys   0.03 ( 1%) wall       0 kB ( 0%) ggc
>  df scan insns         :   0.07 ( 2%) usr   0.00 ( 0%) sys   0.11 ( 2%) wall      42 kB ( 0%) ggc
>  df live regs          :   0.00 ( 0%) usr   0.00 ( 0%) sys   0.03 ( 1%) wall       0 kB ( 0%) ggc
>  df reg dead/unused notes:   0.02 ( 1%) usr   0.00 ( 0%) sys   0.02 ( 0%) wall    1395 kB ( 1%) ggc
>  register information  :   0.00 ( 0%) usr   0.00 ( 0%) sys   0.01 ( 0%) wall       0 kB ( 0%) ggc
>  alias analysis        :   0.01 ( 0%) usr   0.00 ( 0%) sys   0.00 ( 0%) wall     393 kB ( 0%) ggc
>  rebuild jump labels   :   0.01 ( 0%) usr   0.00 ( 0%) sys   0.02 ( 0%) wall       0 kB ( 0%) ggc
>  preprocessing         :   0.11 ( 3%) usr   0.10 (16%) sys   0.39 ( 8%) wall   11550 kB (10%) ggc
>  lexical analysis      :   0.02 ( 1%) usr   0.11 (17%) sys   0.31 ( 7%) wall       0 kB ( 0%) ggc
>
> The following trivial patch should fix that:
> ####### patch against trunk 175201
> Index: gcc/timevar.c
> ===================================================================
> --- gcc/timevar.c       (revision 175201)
> +++ gcc/timevar.c       (working copy)
> @@ -478,7 +478,7 @@ timevar_print (FILE *fp)
>        continue;
>
>       /* The timing variable name.  */
> -      fprintf (fp, " %-22s:", tv->name);
> +      fprintf (fp, " %-24s:", tv->name);
>
>  #ifdef HAVE_USER_TIME
>       /* Print user-mode time for this process.  */
> ####### gcc/ChangeLog entry
> 2011-06-25  Basile Starynkevitch  <basile@starynkevitch.net>
>
>        * timevar.c (timevar_print): Increase width for display of timevar name.
> #######
>
> Ok for trunk?

Ok.

Thanks,
Richard

> Regards
> --
> Basile STARYNKEVITCH         http://starynkevitch.net/Basile/
> email: basile<at>starynkevitch<dot>net mobile: +33 6 8501 2359
> 8, rue de la Faiencerie, 92340 Bourg La Reine, France
> *** opinions {are only mine, sont seulement les miennes} ***
>
Basile Starynkevitch - June 25, 2011, 9:57 a.m.
On Sat, 25 Jun 2011 11:38:20 +0200
Richard Guenther <richard.guenther@gmail.com> wrote:
> > ####### patch against trunk 175201
> > Index: gcc/timevar.c
> > ===================================================================
> > --- gcc/timevar.c       (revision 175201)
> > +++ gcc/timevar.c       (working copy)
> > @@ -478,7 +478,7 @@ timevar_print (FILE *fp)
> >        continue;
> >
> >       /* The timing variable name.  */
> > -      fprintf (fp, " %-22s:", tv->name);
> > +      fprintf (fp, " %-24s:", tv->name);
> >
> >  #ifdef HAVE_USER_TIME
> >       /* Print user-mode time for this process.  */
> > ####### gcc/ChangeLog entry
> > 2011-06-25  Basile Starynkevitch  <basile@starynkevitch.net>
> >
> >        * timevar.c (timevar_print): Increase width for display of timevar name.
> > #######
> >
> > Ok for trunk?
> 
> Ok.
> 
Committed revision 175396.

Thanks
Eric Botcazou - June 25, 2011, 10 a.m.
> > Ok.
>
> Committed revision 175396.

Please avoid posting messages like this.  See http://gcc.gnu.org/svnwrite.html:

"When you have checked in a patch exactly as it has been approved, you do not 
need to tell that to people -- including the approver. People interested in 
when a particular patch is committed can check SVN or the gcc-cvs list."

Patch

Index: gcc/timevar.c
===================================================================
--- gcc/timevar.c	(revision 175201)
+++ gcc/timevar.c	(working copy)
@@ -478,7 +478,7 @@  timevar_print (FILE *fp)
 	continue;
 
       /* The timing variable name.  */
-      fprintf (fp, " %-22s:", tv->name);
+      fprintf (fp, " %-24s:", tv->name);
 
 #ifdef HAVE_USER_TIME
       /* Print user-mode time for this process.  */