This is the mail archive of the 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]
Other format: [Raw text]

Re: [patch] timevar TLC

On 12-08-14 15:06 , Steven Bosscher wrote:
On Tue, Aug 14, 2012 at 8:40 PM, Diego Novillo <> wrote:
On 12-08-14 14:26 , Steven Bosscher wrote:

@@ -505,6 +507,16 @@ timevar_print (FILE *fp) TIMEVAR. */ start_time = now;

+  /* Pester those who add timevars with too long names.  */
+  for (id = 0; id < (unsigned int) TIMEVAR_LAST; ++id)
+    {
+      struct timevar_def *tv = &timevars[(timevar_id_t) id];
+      if ((timevar_id_t) id != TV_TOTAL && tv->used)
+       gcc_assert (strlen (tv->name) <= name_width);
+    }

I'm not liking this too much.  I would rather do truncation or wrapping.
Not ICEing.  And we'd do this all the time, not just with checking enabled.

Wrapping would be bad, it'd break scripts that parse the -ftime-report output.

Hm, good point.

Truncation is a bit silly, too: If the name is always truncated, why
have the long name in the first place?

Yeah, I was more about wrapping it. But you make a good point about scripting.

OK, unless anyone else has better ideas, let's put this in. The other cleanups are good enough, and we can revisit this later.

Is 32 the longest we can tolerate?

Thanks. Diego.

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