aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.c
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2015-06-03 11:36:08 +0200
committerMartin Liska <marxin@gcc.gnu.org>2015-06-03 09:36:08 +0000
commitb2b43e33298fd62d7348696044e51086a02b0cb2 (patch)
tree7c6a8149f569ee6faec897bb31d43beb8e5b4577 /gcc/tree.c
parentac05926156c0997b191af1176122ee3d8663d19e (diff)
downloadgcc-b2b43e33298fd62d7348696044e51086a02b0cb2.zip
gcc-b2b43e33298fd62d7348696044e51086a02b0cb2.tar.gz
gcc-b2b43e33298fd62d7348696044e51086a02b0cb2.tar.bz2
Fix memory report layout at various places.
* alloc-pool.h (struct pool_usage): Correct space padding. * ggc-page.c (ggc_print_statistics): Align columns in a report. * mem-stats.h (struct mem_usage): Add argument to print_dash_line. * tree.c (dump_tree_statistics): Align columns in a report. From-SVN: r224071
Diffstat (limited to 'gcc/tree.c')
-rw-r--r--gcc/tree.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/gcc/tree.c b/gcc/tree.c
index 805e2cc..701a592 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -9156,6 +9156,8 @@ get_callee_fndecl (const_tree call)
return NULL_TREE;
}
+#define TREE_MEM_USAGE_SPACES 40
+
/* Print debugging information about tree nodes generated during the compile,
and any language-specific information. */
@@ -9166,8 +9168,8 @@ dump_tree_statistics (void)
{
int i;
int total_nodes, total_bytes;
- fprintf (stderr, "Kind Nodes Bytes\n");
- fprintf (stderr, "---------------------------------------\n");
+ fprintf (stderr, "\nKind Nodes Bytes\n");
+ mem_usage::print_dash_line (TREE_MEM_USAGE_SPACES);
total_nodes = total_bytes = 0;
for (i = 0; i < (int) all_kinds; i++)
{
@@ -9176,17 +9178,20 @@ dump_tree_statistics (void)
total_nodes += tree_node_counts[i];
total_bytes += tree_node_sizes[i];
}
- fprintf (stderr, "---------------------------------------\n");
+ mem_usage::print_dash_line (TREE_MEM_USAGE_SPACES);
fprintf (stderr, "%-20s %7d %10d\n", "Total", total_nodes, total_bytes);
- fprintf (stderr, "---------------------------------------\n");
+ mem_usage::print_dash_line (TREE_MEM_USAGE_SPACES);
fprintf (stderr, "Code Nodes\n");
- fprintf (stderr, "----------------------------\n");
+ mem_usage::print_dash_line (TREE_MEM_USAGE_SPACES);
for (i = 0; i < (int) MAX_TREE_CODES; i++)
- fprintf (stderr, "%-20s %7d\n", get_tree_code_name ((enum tree_code) i),
+ fprintf (stderr, "%-32s %7d\n", get_tree_code_name ((enum tree_code) i),
tree_code_counts[i]);
- fprintf (stderr, "----------------------------\n");
+ mem_usage::print_dash_line (TREE_MEM_USAGE_SPACES);
+ fprintf (stderr, "\n");
ssanames_print_statistics ();
+ fprintf (stderr, "\n");
phinodes_print_statistics ();
+ fprintf (stderr, "\n");
}
else
fprintf (stderr, "(No per-node statistics)\n");