]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Create a correctly-sized demangled names hashtable
authorChristian Biesinger <cbiesinger@google.com>
Mon, 18 Nov 2019 22:37:31 +0000 (16:37 -0600)
committerChristian Biesinger <cbiesinger@google.com>
Mon, 18 Nov 2019 23:51:10 +0000 (17:51 -0600)
commit6f509f24899f79095673698b611e81f980806fb5
treee378c4bdefb0fc4adf7e8f7f26cf1b7c84f33a34
parentf445b98611f4ae67e645d0a2b75dd5cfa76bf23a
Create a correctly-sized demangled names hashtable

If we have a minsym count, we know the demangled names hashtable will
be at least that big.  So use that count to create it, so we don't
have to resize/rehash it as much.

This is a 6% improvement in minsym loading time.

2019-11-18  Christian Biesinger  <cbiesinger@google.com>

* symtab.c (create_demangled_names_hash): Use per_bfd->
minimal_symbol_count as the initial size, if greater than
our default size.

Change-Id: I1f074d38e1d90af58705ec852f90c84cc034cd2e
gdb/symtab.c