public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 00/19] Add hash table to gdbsupport
@ 2023-04-07 15:25 Tom Tromey
  2023-04-07 15:25 ` [PATCH 01/19] Add a " Tom Tromey
                   ` (20 more replies)
  0 siblings, 21 replies; 29+ messages in thread
From: Tom Tromey @ 2023-04-07 15:25 UTC (permalink / raw)
  To: gdb-patches

I recently read an article about hash tables and was inspired to write
a new one for gdb.  I haven't converted all the libiberty htab uses in
gdb, but this series does change enough of them to, I think, show that
the new implementation is workable.

The benefits of this approach are explained in the first patch.

Regression tested on x86-64 Fedora 36.  This found a latent bug in one
use of htab_t, see the typedefs patch.

Let me know what you think.

---
Tom Tromey (19):
      Add a hash table to gdbsupport
      Convert compile-c-symbols.c to new hash table
      Convert filename-seen-cache.h to new hash table
      Convert linespec.c to new hash table
      Convert target-descriptions.c to new hash table
      Convert dwarf2/macro.c to new hash table
      Convert breakpoint.c to new hash table
      Convert py-framefilter.c to new hash table
      Convert disasm.c to new hash table
      Convert compile/compile.c to new hash table
      Convert type copying to new hash table
      Convert static links to new hash table
      Convert gnu-v3-abi.c to new hash table
      Convert abbrev cache to new hash table
      Convert abbrevs to new hash table
      Convert typedef hash to new hash table
      Convert all_bfds to new hash table
      Convert more DWARF code to new hash table
      Convert gdb_bfd.c to new hash table

 gdb/Makefile.in                         |   2 +-
 gdb/breakpoint.c                        |  16 +-
 gdb/compile/compile-c-symbols.c         |  54 ++--
 gdb/compile/compile-object-run.c        |   4 +-
 gdb/compile/compile.c                   | 151 +--------
 gdb/compile/compile.h                   |  10 +-
 gdb/disasm.c                            |  72 ++---
 gdb/dwarf2/abbrev-cache.c               |  35 +-
 gdb/dwarf2/abbrev-cache.h               |  37 ++-
 gdb/dwarf2/abbrev.c                     |  46 ---
 gdb/dwarf2/abbrev.h                     |  54 +++-
 gdb/dwarf2/cu.c                         |  50 +--
 gdb/dwarf2/cu.h                         |  10 +-
 gdb/dwarf2/macro.c                      |  21 +-
 gdb/dwarf2/read.c                       |  55 ++--
 gdb/extension-priv.h                    |   3 +-
 gdb/extension.c                         |   3 +-
 gdb/extension.h                         |   4 +-
 gdb/filename-seen-cache.c               |  59 ----
 gdb/filename-seen-cache.h               |  35 +-
 gdb/gdb_bfd.c                           | 137 +++-----
 gdb/gdbtypes.c                          |  59 +---
 gdb/gdbtypes.h                          |   7 +-
 gdb/gnu-v3-abi.c                        | 101 +++---
 gdb/guile/guile-internal.h              |   2 +-
 gdb/guile/scm-type.c                    |   9 +-
 gdb/guile/scm-value.c                   |   3 +-
 gdb/linespec.c                          |  53 +--
 gdb/objfiles.c                          |  74 +----
 gdb/objfiles.h                          |   4 +-
 gdb/python/py-framefilter.c             |  25 +-
 gdb/python/py-type.c                    |   6 +-
 gdb/python/py-value.c                   |   3 +-
 gdb/python/python-internal.h            |   2 +-
 gdb/symfile.c                           |   2 +-
 gdb/target-descriptions.c               |  17 +-
 gdb/testsuite/gdb.cp/ptype-flags.exp    |  25 +-
 gdb/testsuite/gdb.gdb/python-helper.exp |   3 +-
 gdb/typeprint.c                         |  89 +-----
 gdb/typeprint.h                         |  29 +-
 gdb/unittests/hash-table-selftests.c    | 128 ++++++++
 gdb/value.c                             |  17 +-
 gdb/value.h                             |   4 +-
 gdbsupport/Makefile.am                  |   1 +
 gdbsupport/Makefile.in                  |  19 +-
 gdbsupport/hash-table.cc                |  75 +++++
 gdbsupport/hash-table.h                 | 551 ++++++++++++++++++++++++++++++++
 47 files changed, 1199 insertions(+), 967 deletions(-)
---
base-commit: 929a05081ec2ca6448927b96f673b0cd9633a342
change-id: 20230407-t-robin-hood-hash-e01cb3a6d3d6

Best regards,
-- 
Tom Tromey <tom@tromey.com>


^ permalink raw reply	[flat|nested] 29+ messages in thread

end of thread, other threads:[~2024-01-12 19:12 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-07 15:25 [PATCH 00/19] Add hash table to gdbsupport Tom Tromey
2023-04-07 15:25 ` [PATCH 01/19] Add a " Tom Tromey
2023-04-07 15:41   ` Tom Tromey
2023-04-07 15:25 ` [PATCH 02/19] Convert compile-c-symbols.c to new hash table Tom Tromey
2023-04-07 15:25 ` [PATCH 03/19] Convert filename-seen-cache.h " Tom Tromey
2023-04-07 15:25 ` [PATCH 04/19] Convert linespec.c " Tom Tromey
2023-04-07 15:25 ` [PATCH 05/19] Convert target-descriptions.c " Tom Tromey
2023-04-07 15:25 ` [PATCH 06/19] Convert dwarf2/macro.c " Tom Tromey
2023-04-07 15:25 ` [PATCH 07/19] Convert breakpoint.c " Tom Tromey
2023-04-07 15:25 ` [PATCH 08/19] Convert py-framefilter.c " Tom Tromey
2023-04-07 15:25 ` [PATCH 09/19] Convert disasm.c " Tom Tromey
2023-04-07 15:25 ` [PATCH 10/19] Convert compile/compile.c " Tom Tromey
2023-04-07 15:25 ` [PATCH 11/19] Convert type copying " Tom Tromey
2023-04-07 15:25 ` [PATCH 12/19] Convert static links " Tom Tromey
2023-04-07 15:25 ` [PATCH 13/19] Convert gnu-v3-abi.c " Tom Tromey
2023-04-07 15:25 ` [PATCH 14/19] Convert abbrev cache " Tom Tromey
2023-04-07 15:25 ` [PATCH 15/19] Convert abbrevs " Tom Tromey
2023-04-07 15:25 ` [PATCH 16/19] Convert typedef hash " Tom Tromey
2023-04-07 15:25 ` [PATCH 17/19] Convert all_bfds " Tom Tromey
2023-04-07 15:25 ` [PATCH 18/19] Convert more DWARF code " Tom Tromey
2023-04-07 15:25 ` [PATCH 19/19] Convert gdb_bfd.c " Tom Tromey
2023-04-10 19:45 ` [PATCH 00/19] Add hash table to gdbsupport John Baldwin
2023-11-03 18:54   ` Tom Tromey
2023-12-08 18:28 ` Tom Tromey
2024-01-11 18:07   ` Tom Tromey
2024-01-11 19:35     ` John Baldwin
2024-01-12  2:57     ` Simon Marchi
2024-01-12 18:22       ` Tom Tromey
2024-01-12 19:12         ` Simon Marchi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).