]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit - gdb/ada-lang.c
Remove find_old_style_renaming_symbol
authorTom Tromey <tromey@adacore.com>
Thu, 23 May 2019 14:40:27 +0000 (10:40 -0400)
committerTom Tromey <tromey@adacore.com>
Tue, 28 May 2019 16:39:01 +0000 (12:39 -0400)
commitc0e70c624fc7d89f5cf281350692de89a063786f
treebf07b9788c154747e92ff75565261c391f77f1bb
parent88981b157b08f2e9a404a2f86d4ee131f17ce3d4
Remove find_old_style_renaming_symbol

We found a case where a "bt" was very slow with Ada code.  Profiling
with callgrind showed this to be primarily due to calls to
find_old_style_renaming_symbol.  Because new-style renaming symbols
were implemented in 2007, it seems safe enough to remove this old
code.

A "-batch -ex bt" test on a large Ada program improves from:

    13.23user 0.57system 0:13.82elapsed 99%CPU (0avgtext+0avgdata 571408maxresident)k

to

    4.25user 0.48system 0:04.74elapsed 99%CPU (0avgtext+0avgdata 559844maxresident)k

with this patch.

Tested on x86-64 Fedora 29.  Joel reviewed this internally; and as it
is Ada-specific, I am checking it in.

gdb/ChangeLog
2019-05-28  Tom Tromey  <tromey@adacore.com>

* ada-lang.c (ada_remove_Xbn_suffix)
(find_old_style_renaming_symbol)
(parse_old_style_renaming): Remove.
(ada_find_renaming_symbol): Don't call
find_old_style_renaming_symbol.
(ada_is_renaming_symbol): Rename from
ada_find_renaming_symbol.  Remove "block" parameter.  Return
bool.  Now static.
(ada_read_var_value): Update and simplify.
* ada-exp.y (write_var_or_type): Remove old code.
gdb/ChangeLog
gdb/ada-exp.y
gdb/ada-lang.c
gdb/ada-lang.h