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]
Other format: [Raw text]

Re: [patch] Fix PR debug/33868, gross memory usage in var-tracking


Hi,

On Tue, 23 Oct 2007, Andrew Pinski wrote:

> On 10/23/07, Michael Matz <matz@suse.de> wrote:
> > On the process of debugging this I also added printing of DECL_UID to the
> > dump file, so the several thousand different decls with the same name
> > could be recognized as different.  Seems sensible on it's own for the next
> > one looking at such a thing, so I've left it in.
> 
> How about controlling printing UID via the -uid option to dump?

Hmm, why not?  Consider the second hunk of my patch be the below.  Still 
okay?


Ciao,
Michael.
-- 
@@ -2209,8 +2211,13 @@ dump_variable (void **slot, void *data A
   int i;
   location_chain node;
 
-  fprintf (dump_file, "  name: %s\n",
+  fprintf (dump_file, "  name: %s",
 	   IDENTIFIER_POINTER (DECL_NAME (var->decl)));
+  if (dump_flags & TDF_UID)
+    fprintf (dump_file, " (%u)\n", DECL_UID (var->decl));
+  else
+    fprintf (dump_file, "\n");
+
   for (i = 0; i < var->n_var_parts; i++)
     {
       fprintf (dump_file, "    offset %ld\n",


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