Commit 46aeb07f by Martin Liska Committed by Martin Liska

Fix string pool statistics.

2018-11-05  Martin Liska  <mliska@suse.cz>

	* symtab.c (ht_dump_statistics): Make dump conditional
	based on alloc_subobject.

From-SVN: r265797
parent 6388cb29
2018-11-05 Martin Liska <mliska@suse.cz>
* symtab.c (ht_dump_statistics): Make dump conditional
based on alloc_subobject.
2018-10-31 Joseph Myers <joseph@codesourcery.com> 2018-10-31 Joseph Myers <joseph@codesourcery.com>
PR bootstrap/82856 PR bootstrap/82856
......
...@@ -304,7 +304,6 @@ ht_dump_statistics (cpp_hash_table *table) ...@@ -304,7 +304,6 @@ ht_dump_statistics (cpp_hash_table *table)
while (++p < limit); while (++p < limit);
nelts = table->nelements; nelts = table->nelements;
overhead = obstack_memory_used (&table->stack) - total_bytes;
headers = table->nslots * sizeof (hashnode); headers = table->nslots * sizeof (hashnode);
fprintf (stderr, "\nString pool\nentries\t\t%lu\n", fprintf (stderr, "\nString pool\nentries\t\t%lu\n",
...@@ -315,9 +314,16 @@ ht_dump_statistics (cpp_hash_table *table) ...@@ -315,9 +314,16 @@ ht_dump_statistics (cpp_hash_table *table)
(unsigned long) table->nslots); (unsigned long) table->nslots);
fprintf (stderr, "deleted\t\t%lu\n", fprintf (stderr, "deleted\t\t%lu\n",
(unsigned long) deleted); (unsigned long) deleted);
fprintf (stderr, "bytes\t\t%lu%c (%lu%c overhead)\n",
SCALE (total_bytes), LABEL (total_bytes), if (table->alloc_subobject)
SCALE (overhead), LABEL (overhead)); fprintf (stderr, "GGC bytes\t%lu%c\n",
SCALE (total_bytes), LABEL (total_bytes));
else
{
overhead = obstack_memory_used (&table->stack) - total_bytes;
fprintf (stderr, "obstack bytes\t%lu%c (%lu%c overhead)\n",
SCALE (total_bytes), LABEL (total_bytes));
}
fprintf (stderr, "table size\t%lu%c\n", fprintf (stderr, "table size\t%lu%c\n",
SCALE (headers), LABEL (headers)); SCALE (headers), LABEL (headers));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment