summaryrefslogtreecommitdiff
path: root/libcpp/line-map.c
diff options
context:
space:
mode:
authordmalcolm <dmalcolm@138bc75d-0d04-0410-961f-82ee72b054a4>2015-11-06 18:40:56 +0000
committerdmalcolm <dmalcolm@138bc75d-0d04-0410-961f-82ee72b054a4>2015-11-06 18:40:56 +0000
commit0ffb44747125e187d0b34c99df0f04066a112fb7 (patch)
tree35d3167f828cdec190d251bc1b3ee85fef95dfbf /libcpp/line-map.c
parent509a4f77b574a67eeb3024c0ad51d68ddffffa15 (diff)
downloadgcc-0ffb44747125e187d0b34c99df0f04066a112fb7.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229873 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libcpp/line-map.c')
-rw-r--r--libcpp/line-map.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libcpp/line-map.c b/libcpp/line-map.c
index 3d82e9bfca9..84403de9c77 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;
}