Simplify the psymbol hash function
authorTom Tromey <tom@tromey.com>
Thu, 2 Nov 2017 18:48:44 +0000 (12:48 -0600)
committerTom Tromey <tom@tromey.com>
Thu, 9 Nov 2017 15:31:40 +0000 (08:31 -0700)
commite793c052f9d9548442a46817998a46cbca4ccb70
tree18fe42c0649c4b6290b6dc6c27d4efe0d67c08c3
parent7e8835c5f44931d02ecd8c8ba3d167e891981d24
Simplify the psymbol hash function

This patch simplifies the psymbol_hash function, by changing it not to
examine the contents of the symbol's name.  This change just mirrors
what psymbol_compare already does -- it is checking for name equality,
which is ok because symbol names are interned in symbol_set_names.

This change speeds up psymbol reading.  "gdb -nx -batch gdb"
previously took ~1.8 seconds on my machine, and with this patch it now
takes ~1.7 seconds.

gdb/ChangeLog
2017-11-09  Tom Tromey  <tom@tromey.com>

* psymtab.c (psymbol_hash): Do not hash string contents.
(psymbol_compare): Add comment.
gdb/ChangeLog
gdb/psymtab.c