aboutsummaryrefslogtreecommitdiff
path: root/gdb/tic6x-tdep.h
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2017-06-12 02:40:18 +0100
committerPedro Alves <palves@redhat.com>2017-06-12 17:06:25 +0100
commite8f8bcb35f22965c8e4309c4aa4227241c485fe7 (patch)
treed7f113ea968a514feb5327c27a76f393e6f41a11 /gdb/tic6x-tdep.h
parent70a1152bee7cb959ab0c6c13bada03190125022f (diff)
downloadgdb-e8f8bcb35f22965c8e4309c4aa4227241c485fe7.zip
gdb-e8f8bcb35f22965c8e4309c4aa4227241c485fe7.tar.gz
gdb-e8f8bcb35f22965c8e4309c4aa4227241c485fe7.tar.bz2
.gdb_index prod perf regression: Estimate size of psyms_seen
Using the same test as the previous patch, perf shows GDB spending over 7% in "free". A substantial number of those calls comes from insertions in the psyms_seen unordered_set causing lots of rehashing and recreating buckets. Fix this by computing an estimate of the size of the set upfront. Using the same test as in the previous patch, against the same gdb inferior, timing improves ~8% further: ~6.5s => ~6.0s (average of 5 runs). gdb/ChangeLog: 2017-06-12 Pedro Alves <palves@redhat.com> * dwarf2read.c (recursively_count_psymbols): New function. (write_psymtabs_to_index): Call it to compute number of psyms and pass estimate size of psyms_seen to unordered_set's ctor.
Diffstat (limited to 'gdb/tic6x-tdep.h')
0 files changed, 0 insertions, 0 deletions