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]

[RFA] Statistics tweak


I noticed that dump_tree_statistics() was printing a variable called
id_string_size, which was unused and always zero.  I suspect this got
lost when we switched to string pools.

So, this patch fixes that; and calls dump_tree_statistics () from
toplev.c.  Until now, it was only called by the C++ front end, which
seemed a waste.

OK to commit?

Neil.

	* tree.c (id_string_size): Remove.
	(dump_tree_statistics): Update.
	* toplev.c (compile_file): If dumping stats, dump tree stats too.

Index: tree.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree.c,v
retrieving revision 1.215
diff -u -p -r1.215 tree.c
--- tree.c	2001/10/21 21:32:01	1.215
+++ tree.c	2001/10/28 10:40:45
@@ -110,7 +110,6 @@ typedef enum
 
 int tree_node_counts[(int) all_kinds];
 int tree_node_sizes[(int) all_kinds];
-int id_string_size = 0;
 
 static const char * const tree_node_kind_names[] = {
   "decls",
@@ -4417,7 +4416,6 @@ dump_tree_statistics ()
       total_nodes += tree_node_counts[i];
       total_bytes += tree_node_sizes[i];
     }
-  fprintf (stderr, "%-20s        %9d\n", "identifier names", id_string_size);
   fprintf (stderr, "-------------------------------------\n");
   fprintf (stderr, "%-20s %6d %9d\n", "Total", total_nodes, total_bytes);
   fprintf (stderr, "-------------------------------------\n");
Index: toplev.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/toplev.c,v
retrieving revision 1.526
diff -u -p -r1.526 toplev.c
--- toplev.c	2001/10/25 17:56:51	1.526
+++ toplev.c	2001/10/28 10:41:02
@@ -2478,6 +2478,7 @@ compile_file (name)
     {
       ggc_print_statistics ();
       stringpool_statistics ();
+      dump_tree_statistics ();
     }
 
   /* Free up memory for the benefit of leak detectors.  */


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