allocation. */
fprintf (stderr,
"Memory still allocated at the end of the compilation process\n");
- fprintf (stderr, "%-5s %10s %10s %10s\n",
+ fprintf (stderr, "%-8s %10s %10s %10s\n",
"Size", "Allocated", "Used", "Overhead");
for (i = 0; i < NUM_ORDERS; ++i)
{
overhead += (sizeof (page_entry) - sizeof (long)
+ BITMAP_SIZE (OBJECTS_IN_PAGE (p) + 1));
}
- fprintf (stderr, "%-5lu %10lu%c %10lu%c %10lu%c\n",
+ fprintf (stderr, "%-8lu %10lu%c %10lu%c %10lu%c\n",
(unsigned long) OBJECT_SIZE (i),
SCALE (allocated), STAT_LABEL (allocated),
SCALE (in_use), STAT_LABEL (in_use),
SCALE (overhead), STAT_LABEL (overhead));
total_overhead += overhead;
}
- fprintf (stderr, "%-5s %10lu%c %10lu%c %10lu%c\n", "Total",
+ fprintf (stderr, "%-8s %10lu%c %10lu%c %10lu%c\n", "Total",
SCALE (G.bytes_mapped), STAT_LABEL (G.bytes_mapped),
SCALE (G.allocated), STAT_LABEL (G.allocated),
SCALE (total_overhead), STAT_LABEL (total_overhead));
if (GATHER_STATISTICS)
{
- fprintf (stderr, "\nTotal allocations and overheads during the compilation process\n");
+ fprintf (stderr, "\nTotal allocations and overheads during "
+ "the compilation process\n");
- fprintf (stderr, "Total Overhead: %10" HOST_LONG_LONG_FORMAT "d\n",
- G.stats.total_overhead);
- fprintf (stderr, "Total Allocated: %10" HOST_LONG_LONG_FORMAT "d\n",
+ fprintf (stderr, "Total Overhead: %10"
+ HOST_LONG_LONG_FORMAT "d\n", G.stats.total_overhead);
+ fprintf (stderr, "Total Allocated: %10"
+ HOST_LONG_LONG_FORMAT "d\n",
G.stats.total_allocated);
- fprintf (stderr, "Total Overhead under 32B: %10" HOST_LONG_LONG_FORMAT "d\n",
- G.stats.total_overhead_under32);
- fprintf (stderr, "Total Allocated under 32B: %10" HOST_LONG_LONG_FORMAT "d\n",
- G.stats.total_allocated_under32);
- fprintf (stderr, "Total Overhead under 64B: %10" HOST_LONG_LONG_FORMAT "d\n",
- G.stats.total_overhead_under64);
- fprintf (stderr, "Total Allocated under 64B: %10" HOST_LONG_LONG_FORMAT "d\n",
- G.stats.total_allocated_under64);
- fprintf (stderr, "Total Overhead under 128B: %10" HOST_LONG_LONG_FORMAT "d\n",
- G.stats.total_overhead_under128);
- fprintf (stderr, "Total Allocated under 128B: %10" HOST_LONG_LONG_FORMAT "d\n",
- G.stats.total_allocated_under128);
+ fprintf (stderr, "Total Overhead under 32B: %10"
+ HOST_LONG_LONG_FORMAT "d\n", G.stats.total_overhead_under32);
+ fprintf (stderr, "Total Allocated under 32B: %10"
+ HOST_LONG_LONG_FORMAT "d\n", G.stats.total_allocated_under32);
+ fprintf (stderr, "Total Overhead under 64B: %10"
+ HOST_LONG_LONG_FORMAT "d\n", G.stats.total_overhead_under64);
+ fprintf (stderr, "Total Allocated under 64B: %10"
+ HOST_LONG_LONG_FORMAT "d\n", G.stats.total_allocated_under64);
+ fprintf (stderr, "Total Overhead under 128B: %10"
+ HOST_LONG_LONG_FORMAT "d\n", G.stats.total_overhead_under128);
+ fprintf (stderr, "Total Allocated under 128B: %10"
+ HOST_LONG_LONG_FORMAT "d\n", G.stats.total_allocated_under128);
for (i = 0; i < NUM_ORDERS; i++)
if (G.stats.total_allocated_per_order[i])
{
- fprintf (stderr, "Total Overhead page size %7lu: %10" HOST_LONG_LONG_FORMAT "d\n",
+ fprintf (stderr, "Total Overhead page size %9lu: %10"
+ HOST_LONG_LONG_FORMAT "d\n",
(unsigned long) OBJECT_SIZE (i),
G.stats.total_overhead_per_order[i]);
- fprintf (stderr, "Total Allocated page size %7lu: %10" HOST_LONG_LONG_FORMAT "d\n",
+ fprintf (stderr, "Total Allocated page size %9lu: %10"
+ HOST_LONG_LONG_FORMAT "d\n",
(unsigned long) OBJECT_SIZE (i),
G.stats.total_allocated_per_order[i]);
}
return NULL_TREE;
}
+#define TREE_MEM_USAGE_SPACES 40
+
/* Print debugging information about tree nodes generated during the compile,
and any language-specific information. */
{
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++)
{
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");