diff options
author | Tom Tromey <tromey@adacore.com> | 2023-11-10 09:16:17 -0700 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2023-12-06 10:07:36 -0700 |
commit | 47cd8fcf54b0ea6b5c4e576e194022500211f06e (patch) | |
tree | 1495c627de2b9f16a2138e55240b3c3a495510fb /sim/common | |
parent | d8ad643f4ef7fa77425e58f157fe3f2917ef46b4 (diff) | |
download | binutils-47cd8fcf54b0ea6b5c4e576e194022500211f06e.zip binutils-47cd8fcf54b0ea6b5c4e576e194022500211f06e.tar.gz binutils-47cd8fcf54b0ea6b5c4e576e194022500211f06e.tar.bz2 |
Improve performance of Ada name searches
A user reported that certain operations -- like printing a large
structure -- could be slow. I tracked this down to
ada-lang.c:map_matching_symbols taking an inordinate amount of time.
Specifically, calls like the one to look for a parallel "__XVZ"
variable, in ada_to_fixed_type_1, could result in gdb walking over all
the entries in the cooked index over and over.
Looking into this reveals that
cooked_index_functions::expand_matching_symbols is not written
efficiently -- it ignores its "ordered_compare" parameter. While
fixing this would be good, it turns out that this entire method isn't
needed; so this series removes it.
However, the deletion is not done in this patch. This one, instead,
fixes the immediate cause of the slowdown, by using
objfile::expand_symtabs_matching when possible. This approach is
faster because it is more selective about which index entries to
examine.
Diffstat (limited to 'sim/common')
0 files changed, 0 insertions, 0 deletions