diff options
author | David Malcolm <dmalcolm@redhat.com> | 2015-11-06 18:40:56 +0000 |
---|---|---|
committer | David Malcolm <dmalcolm@gcc.gnu.org> | 2015-11-06 18:40:56 +0000 |
commit | ee015909ee4656557a0fad1795dfd1bd2391735d (patch) | |
tree | 35d3167f828cdec190d251bc1b3ee85fef95dfbf | |
parent | 2a8e33581b09efb6f9e9897b82133e510062fe91 (diff) | |
download | gcc-ee015909ee4656557a0fad1795dfd1bd2391735d.zip gcc-ee015909ee4656557a0fad1795dfd1bd2391735d.tar.gz gcc-ee015909ee4656557a0fad1795dfd1bd2391735d.tar.bz2 |
Add stats on adhoc table to dump_line_table_statistics
gcc/ChangeLog:
* input.c (dump_line_table_statistics): Dump stats on adhoc table.
libcpp/ChangeLog:
* include/line-map.h (struct linemap_stats): Add fields
"adhoc_table_size" and "adhoc_table_entries_used".
* line-map.c (linemap_get_statistics): Populate above fields.
From-SVN: r229873
-rw-r--r-- | gcc/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/input.c | 6 | ||||
-rw-r--r-- | libcpp/ChangeLog | 6 | ||||
-rw-r--r-- | libcpp/include/line-map.h | 2 | ||||
-rw-r--r-- | libcpp/line-map.c | 3 |
5 files changed, 21 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 64388a4..77bc739 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2015-11-06 David Malcolm <dmalcolm@redhat.com> + + * input.c (dump_line_table_statistics): Dump stats on adhoc table. + 2015-11-07 Jan Hubicka <hubicka@ucw.cz> * tree-core.h (size_type_kind): Remove OEP_CONSTANT_ADDRESS_OF and diff --git a/gcc/input.c b/gcc/input.c index e7302a4..ff80dd9 100644 --- a/gcc/input.c +++ b/gcc/input.c @@ -866,6 +866,12 @@ dump_line_table_statistics (void) fprintf (stderr, "Total used maps size: %5ld%c\n", SCALE (total_used_map_size), STAT_LABEL (total_used_map_size)); + fprintf (stderr, "Ad-hoc table size: %5ld%c\n", + SCALE (s.adhoc_table_size), + STAT_LABEL (s.adhoc_table_size)); + fprintf (stderr, "Ad-hoc table entries used: %5ld\n", + s.adhoc_table_entries_used); + fprintf (stderr, "\n"); } diff --git a/libcpp/ChangeLog b/libcpp/ChangeLog index f2ce57a..8abf6dd 100644 --- a/libcpp/ChangeLog +++ b/libcpp/ChangeLog @@ -1,3 +1,9 @@ +2015-11-06 David Malcolm <dmalcolm@redhat.com> + + * include/line-map.h (struct linemap_stats): Add fields + "adhoc_table_size" and "adhoc_table_entries_used". + * line-map.c (linemap_get_statistics): Populate above fields. + 2015-11-04 Mikhail Maltsev <maltsevm@gmail.com> * config.in: Regenerate. diff --git a/libcpp/include/line-map.h b/libcpp/include/line-map.h index e5867ed..c8618a9 100644 --- a/libcpp/include/line-map.h +++ b/libcpp/include/line-map.h @@ -1143,6 +1143,8 @@ struct linemap_stats long macro_maps_used_size; long macro_maps_locations_size; long duplicated_macro_maps_locations_size; + long adhoc_table_size; + long adhoc_table_entries_used; }; /* Return the highest location emitted for a given file for which diff --git a/libcpp/line-map.c b/libcpp/line-map.c index 3d82e9b..84403de 100644 --- a/libcpp/line-map.c +++ b/libcpp/line-map.c @@ -1712,6 +1712,9 @@ linemap_get_statistics (struct line_maps *set, s->macro_maps_used_size = macro_maps_used_size; s->duplicated_macro_maps_locations_size = duplicated_macro_maps_locations_size; + s->adhoc_table_size = (set->location_adhoc_data_map.allocated + * sizeof (struct location_adhoc_data)); + s->adhoc_table_entries_used = set->location_adhoc_data_map.curr_loc; } |