This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[review v4] Precompute hash value for symbol_set_names
- From: "Tom Tromey (Code Review)" <gerrit at gnutoolchain-gerrit dot osci dot io>
- To: Christian Biesinger <cbiesinger at google dot com>, gdb-patches at sourceware dot org
- Date: Tue, 26 Nov 2019 17:08:35 -0500
- Subject: [review v4] Precompute hash value for symbol_set_names
- Auto-submitted: auto-generated
- References: <gerrit.1572031795000.I044449e7eb60cffc1c43efd3412f2b485bd9faac@gnutoolchain-gerrit.osci.io>
- Reply-to: gnutoolchain-gerrit at osci dot io
Tom Tromey has posted comments on this change.
Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/307
......................................................................
Patch Set 4: Code-Review+2
(1 comment)
Thanks for doing this. This looks good to me. I have one nit;
this is ok with that fixed.
| --- gdb/minsyms.c
| +++ gdb/minsyms.c
| @@ -1252,13 +1252,19 @@ static void
| clear_minimal_symbol_hash_tables (struct objfile *objfile)
| {
| for (size_t i = 0; i < MINIMAL_SYMBOL_HASH_SIZE; i++)
| {
| objfile->per_bfd->msymbol_hash[i] = 0;
| objfile->per_bfd->msymbol_demangled_hash[i] = 0;
| }
| }
|
| +struct computed_hash_values
PS4, Line 1261:
This should have a comment explaining its purpose.
Also the fields should have comments.
| +{
| + size_t name_length;
| + hashval_t mangled_name_hash;
| +};
| +
| /* Build (or rebuild) the minimal symbol hash tables. This is necessary
| after compacting or sorting the table since the entries move around
| thus causing the internal minimal_symbol pointers to become jumbled. */
|
--
Gerrit-Project: binutils-gdb
Gerrit-Branch: master
Gerrit-Change-Id: I044449e7eb60cffc1c43efd3412f2b485bd9faac
Gerrit-Change-Number: 307
Gerrit-PatchSet: 4
Gerrit-Owner: Christian Biesinger <cbiesinger@google.com>
Gerrit-Reviewer: Tom Tromey <tromey@sourceware.org>
Gerrit-Comment-Date: Tue, 26 Nov 2019 22:08:35 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment