Lazily compute partial DIE name
Currently the name of a partial DIE is computed eagerly. However, the
name is not always needed. This patch changes partial DIEs to compute
their name lazily, improving performance by avoiding unnecessary name
computations.
The run previous to this had times of (see the first patch in the
series for an explanation):
gdb 1.88
libxul 2.11
Ada 2.60
This patch improves the times to:
gdb 1.69
libxul 2.02
Ada 2.52
gdb/ChangeLog
2020-05-27 Tom Tromey <tromey@adacore.com>
* dwarf2/read.c (struct partial_die_info) <name>: Declare new
method.
<canonical_name>: New member.
<raw_name>: Rename from "name".
(partial_die_info): Initialize canonical_name.
(scan_partial_symbols): Check raw_name.
(partial_die_parent_scope, partial_die_full_name)
(add_partial_symbol, add_partial_subprogram)
(add_partial_enumeration, load_partial_dies): Use "name" method.
(partial_die_info::name): New method.
(partial_die_info::read, guess_partial_die_structure_name)
(partial_die_info::fixup): Update.