public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH v5 00/25] Add a C++ hash table to gdbsupport
@ 2024-11-04 18:27 Simon Marchi
  2024-11-04 18:27 ` [PATCH v5 01/25] gdb: rename abbrev_cache to abbrev_table_cache Simon Marchi
                   ` (25 more replies)
  0 siblings, 26 replies; 27+ messages in thread
From: Simon Marchi @ 2024-11-04 18:27 UTC (permalink / raw)
  To: gdb-patches; +Cc: Simon Marchi

This is v5 of:

  https://inbox.sourceware.org/gdb-patches/20240823184910.883268-1-simon.marchi@efficios.com/T/#mf7bcbcdcff5141ee39fc7c5d02298b6ebaccc11b

The most important changes in this version is the use
`gdb::unordered_set` instead of `gdb::unordered_map` in the following
patches, to avoid storing redundant information (when the identity can
be computed from the object being stored):

  Convert abbrevs to new hash table
  Convert abbrev cache to new hash table
  Convert dwarf2_cu::call_site_htab to new hash table
  Convert dwarf_cu::die_hash to new hash table
  Convert typedef hash to new hash table

While working on this, I made some cleanups in the abbrev area, so I
tacked some cleanup patches at the beginning of the series.

In "Convert type copying to new hash table", add one seemingly missing
call to `clear`.

Simon Marchi (25):
  gdb: rename abbrev_cache to abbrev_table_cache
  gdb: constification around abbrev_table_cache and abbrev_table
  gdb: make `cooked_index_storage::get_abbrev_table_cache` return a
    reference
  gdbsupport: add unordered_dense.h 4.4.0
  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
  Convert dwarf_cu::die_hash to new hash table
  Convert dwarf2_cu::call_site_htab to new hash table
  Convert dwarf2_per_objfile::die_type_hash to new hash table

 gdb/Makefile.in                         |    3 +-
 gdb/breakpoint.c                        |   13 +-
 gdb/compile/compile-c-symbols.c         |   53 +-
 gdb/compile/compile-object-run.c        |    6 +-
 gdb/compile/compile.c                   |  154 +-
 gdb/compile/compile.h                   |   11 +-
 gdb/disasm.c                            |   85 +-
 gdb/dwarf2/abbrev-cache.c               |   63 -
 gdb/dwarf2/abbrev-cache.h               |   65 -
 gdb/dwarf2/abbrev-table-cache.c         |   33 +
 gdb/dwarf2/abbrev-table-cache.h         |   95 ++
 gdb/dwarf2/abbrev.c                     |   46 -
 gdb/dwarf2/abbrev.h                     |   61 +-
 gdb/dwarf2/call-site.h                  |   65 +-
 gdb/dwarf2/cooked-index.h               |   15 +-
 gdb/dwarf2/cu.c                         |   52 +-
 gdb/dwarf2/cu.h                         |   15 +-
 gdb/dwarf2/die.c                        |   21 -
 gdb/dwarf2/die.h                        |   37 +-
 gdb/dwarf2/macro.c                      |   22 +-
 gdb/dwarf2/read.c                       |  225 +--
 gdb/dwarf2/read.h                       |   40 +-
 gdb/extension-priv.h                    |    3 +-
 gdb/extension.c                         |    3 +-
 gdb/extension.h                         |    5 +-
 gdb/filename-seen-cache.c               |   58 -
 gdb/filename-seen-cache.h               |   41 +-
 gdb/gdb_bfd.c                           |  159 +-
 gdb/gdbtypes.c                          |   59 +-
 gdb/gdbtypes.h                          |    7 +-
 gdb/gnu-v3-abi.c                        |   98 +-
 gdb/guile/guile-internal.h              |    2 +-
 gdb/guile/scm-type.c                    |    7 +-
 gdb/guile/scm-value.c                   |    3 +-
 gdb/linespec.c                          |   54 +-
 gdb/objfiles.c                          |   74 +-
 gdb/objfiles.h                          |    4 +-
 gdb/python/py-framefilter.c             |   62 +-
 gdb/python/py-type.c                    |    7 +-
 gdb/python/py-value.c                   |    3 +-
 gdb/python/python-internal.h            |    2 +-
 gdb/symfile.c                           |    2 +-
 gdb/symtab.c                            |   30 +-
 gdb/symtab.h                            |    5 +-
 gdb/target-descriptions.c               |   20 +-
 gdb/testsuite/gdb.cp/ptype-flags.exp    |   25 +-
 gdb/testsuite/gdb.gdb/python-helper.exp |    3 +-
 gdb/typeprint.c                         |  109 +-
 gdb/typeprint.h                         |   47 +-
 gdb/value.c                             |   17 +-
 gdb/value.h                             |    4 +-
 gdbsupport/unordered_dense.h            | 2032 +++++++++++++++++++++++
 gdbsupport/unordered_map.h              |   37 +
 gdbsupport/unordered_set.h              |   36 +
 54 files changed, 2849 insertions(+), 1349 deletions(-)
 delete mode 100644 gdb/dwarf2/abbrev-cache.c
 delete mode 100644 gdb/dwarf2/abbrev-cache.h
 create mode 100644 gdb/dwarf2/abbrev-table-cache.c
 create mode 100644 gdb/dwarf2/abbrev-table-cache.h
 delete mode 100644 gdb/filename-seen-cache.c
 create mode 100644 gdbsupport/unordered_dense.h
 create mode 100644 gdbsupport/unordered_map.h
 create mode 100644 gdbsupport/unordered_set.h


base-commit: 0b4c9b505757b477be5481f42ac3839a90491ad1
-- 
2.47.0


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

end of thread, other threads:[~2024-11-22 19:10 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-11-04 18:27 [PATCH v5 00/25] Add a C++ hash table to gdbsupport Simon Marchi
2024-11-04 18:27 ` [PATCH v5 01/25] gdb: rename abbrev_cache to abbrev_table_cache Simon Marchi
2024-11-04 18:27 ` [PATCH v5 02/25] gdb: constification around abbrev_table_cache and abbrev_table Simon Marchi
2024-11-04 18:27 ` [PATCH v5 03/25] gdb: make `cooked_index_storage::get_abbrev_table_cache` return a reference Simon Marchi
2024-11-04 18:27 ` [PATCH v5 04/25] gdbsupport: add unordered_dense.h 4.4.0 Simon Marchi
2024-11-04 18:27 ` [PATCH v5 05/25] Convert compile-c-symbols.c to new hash table Simon Marchi
2024-11-04 18:27 ` [PATCH v5 06/25] Convert filename-seen-cache.h " Simon Marchi
2024-11-04 18:27 ` [PATCH v5 07/25] Convert linespec.c " Simon Marchi
2024-11-04 18:27 ` [PATCH v5 08/25] Convert target-descriptions.c " Simon Marchi
2024-11-04 18:27 ` [PATCH v5 09/25] Convert dwarf2/macro.c " Simon Marchi
2024-11-04 18:27 ` [PATCH v5 10/25] Convert breakpoint.c " Simon Marchi
2024-11-04 18:27 ` [PATCH v5 11/25] Convert py-framefilter.c " Simon Marchi
2024-11-04 18:27 ` [PATCH v5 12/25] Convert disasm.c " Simon Marchi
2024-11-04 18:27 ` [PATCH v5 13/25] Convert compile/compile.c " Simon Marchi
2024-11-04 18:27 ` [PATCH v5 14/25] Convert type copying " Simon Marchi
2024-11-04 18:27 ` [PATCH v5 15/25] Convert static links " Simon Marchi
2024-11-04 18:27 ` [PATCH v5 16/25] Convert gnu-v3-abi.c " Simon Marchi
2024-11-04 18:27 ` [PATCH v5 17/25] Convert abbrev cache " Simon Marchi
2024-11-04 18:27 ` [PATCH v5 18/25] Convert abbrevs " Simon Marchi
2024-11-04 18:27 ` [PATCH v5 19/25] Convert typedef hash " Simon Marchi
2024-11-04 18:27 ` [PATCH v5 20/25] Convert all_bfds " Simon Marchi
2024-11-04 18:27 ` [PATCH v5 21/25] Convert more DWARF code " Simon Marchi
2024-11-04 18:27 ` [PATCH v5 22/25] Convert gdb_bfd.c " Simon Marchi
2024-11-04 18:27 ` [PATCH v5 23/25] Convert dwarf_cu::die_hash " Simon Marchi
2024-11-04 18:27 ` [PATCH v5 24/25] Convert dwarf2_cu::call_site_htab " Simon Marchi
2024-11-04 18:27 ` [PATCH v5 25/25] Convert dwarf2_per_objfile::die_type_hash " Simon Marchi
2024-11-22 19:10 ` [PATCH v5 00/25] Add a C++ hash table to gdbsupport Tom Tromey

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).