diff options
author | Tom Tromey <tromey@adacore.com> | 2020-05-27 11:48:18 -0600 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2020-05-27 11:48:19 -0600 |
commit | f0fbb768c223fd65385e2e2380fd04fde7121e5e (patch) | |
tree | c8384b7b106c852f4f2f698bc5553e4619d9e760 /gdb/dwarf2 | |
parent | af0b2a3e85df9f49a3528e5b7578fcf9412f1acc (diff) | |
download | gdb-f0fbb768c223fd65385e2e2380fd04fde7121e5e.zip gdb-f0fbb768c223fd65385e2e2380fd04fde7121e5e.tar.gz gdb-f0fbb768c223fd65385e2e2380fd04fde7121e5e.tar.bz2 |
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.
Diffstat (limited to 'gdb/dwarf2')
-rw-r--r-- | gdb/dwarf2/read.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c index 655338d..a62224c 100644 --- a/gdb/dwarf2/read.c +++ b/gdb/dwarf2/read.c @@ -18358,10 +18358,8 @@ load_partial_dies (const struct die_reader_specs *reader, || pdi.tag == DW_TAG_subrange_type)) { if (building_psymtab && pdi.raw_name != NULL) - add_psymbol_to_list (pdi.name (cu), false, - VAR_DOMAIN, LOC_TYPEDEF, -1, - psymbol_placement::STATIC, - 0, cu->language, objfile); + add_partial_symbol (&pdi, cu); + info_ptr = locate_pdi_sibling (reader, &pdi, info_ptr); continue; } @@ -18392,12 +18390,7 @@ load_partial_dies (const struct die_reader_specs *reader, if (pdi.raw_name == NULL) complaint (_("malformed enumerator DIE ignored")); else if (building_psymtab) - add_psymbol_to_list (pdi.name (cu), false, - VAR_DOMAIN, LOC_CONST, -1, - cu->language == language_cplus - ? psymbol_placement::GLOBAL - : psymbol_placement::STATIC, - 0, cu->language, objfile); + add_partial_symbol (&pdi, cu); info_ptr = locate_pdi_sibling (reader, &pdi, info_ptr); continue; |