Use add_partial_symbol in load_partial_dies
authorTom Tromey <tromey@adacore.com>
Wed, 27 May 2020 17:48:18 +0000 (11:48 -0600)
committerTom Tromey <tromey@adacore.com>
Wed, 27 May 2020 17:48:19 +0000 (11:48 -0600)
commitf0fbb768c223fd65385e2e2380fd04fde7121e5e
treec8384b7b106c852f4f2f698bc5553e4619d9e760
parentaf0b2a3e85df9f49a3528e5b7578fcf9412f1acc
Use add_partial_symbol in load_partial_dies

An earlier patch added the add_partial_symbol helper function to
dwarf2/read.c.  However, a couple of calls to add_psymbol_to_list were
left in place.  It turns out that these calls slow down partial symbol
reading, because they still go via the path that tries to needlessly
demangle already-demangled names.

This patch improves the performance of partial symbol reading by
changing this code to use add_partial_symbol instead.

The run previous to this had times of (see the first patch in the
series for an explanation):

gdb    1.64
libxul 1.99
Ada    2.47

This patch improves the times to:

gdb    1.47
libxul 1.89
Ada    2.39

gdb/ChangeLog
2020-05-27  Tom Tromey  <tromey@adacore.com>

* dwarf2/read.c (load_partial_dies): Use add_partial_symbol.
gdb/ChangeLog
gdb/dwarf2/read.c