Store the mangled name as a string_view
authorChristian Biesinger <cbiesinger@google.com>
Fri, 27 Sep 2019 17:40:04 +0000 (12:40 -0500)
committerChristian Biesinger <cbiesinger@google.com>
Tue, 22 Oct 2019 16:25:31 +0000 (11:25 -0500)
commit7bb43059820c5febb4509b15202a93efde442bc6
tree897162cc893ad9a29aae05506f5ef958d8682718
parent6207ed28773381859319cf314eb9c4e0683c0773
Store the mangled name as a string_view

This should be a bit faster (because we can compare the size first),
but it is also a dependency for the next patch.

(3.47% of gdb startup time is spent in eq_demangled_name_entry when
attaching to Chrome's content_shell binary)

gdb/ChangeLog:

2019-10-22  Christian Biesinger  <cbiesinger@google.com>

* symtab.c (struct demangled_name_entry): Change type of mangled
to gdb::string_view. Also adds a constructor that takes the
mangled name.
(hash_demangled_name_entry): Update.
(eq_demangled_name_entry): Update.
(free_demangled_name_entry): New function to call the destructor
now that this is not a POD anymore.
(create_demangled_names_hash): Pass free_demangled_name_entry to
htab_create_alloc.
(symbol_set_names): Update.

Change-Id: I24711ae2bcaa9e79ca89a6f8fda385d400419175
gdb/ChangeLog
gdb/symtab.c
This page took 0.024041 seconds and 4 git commands to generate.