diff options
author | Christian Biesinger <cbiesinger@google.com> | 2019-10-03 13:05:06 -0500 |
---|---|---|
committer | Christian Biesinger <cbiesinger@google.com> | 2019-11-27 15:36:59 -0600 |
commit | e76b224615f88255a3fd20d613983dde6cc240b3 (patch) | |
tree | 054769222cac115cdeaa6a89e46d5172a9e64ce6 /gdb/symtab.h | |
parent | 640ab94712483457b99bd1039b52821c510b28a7 (diff) | |
download | gdb-e76b224615f88255a3fd20d613983dde6cc240b3.zip gdb-e76b224615f88255a3fd20d613983dde6cc240b3.tar.gz gdb-e76b224615f88255a3fd20d613983dde6cc240b3.tar.bz2 |
Precompute hash value for symbol_set_names
We can also compute the hash for the mangled name on a background
thread so make this function even faster (about a 7% speedup).
gdb/ChangeLog:
2019-11-27 Christian Biesinger <cbiesinger@google.com>
* minsyms.c (minimal_symbol_reader::install): Also compute the hash
of the mangled name on the background thread.
* symtab.c (symbol_set_names): Allow passing in the hash of the
linkage_name.
* symtab.h (symbol_set_names): Likewise.
Change-Id: I044449e7eb60cffc1c43efd3412f2b485bd9faac
Diffstat (limited to 'gdb/symtab.h')
-rw-r--r-- | gdb/symtab.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gdb/symtab.h b/gdb/symtab.h index 7a51456..4cfdf06 100644 --- a/gdb/symtab.h +++ b/gdb/symtab.h @@ -553,7 +553,9 @@ extern char *symbol_find_demangled_name (struct general_symbol_info *gsymbol, (objfile)->per_bfd) extern void symbol_set_names (struct general_symbol_info *symbol, gdb::string_view linkage_name, bool copy_name, - struct objfile_per_bfd_storage *per_bfd); + struct objfile_per_bfd_storage *per_bfd, + gdb::optional<hashval_t> hash + = gdb::optional<hashval_t> ()); /* Return true if NAME matches the "search" name of SYMBOL, according to the symbol's language. */ |