diff options
author | Srđan Milaković <sm108@rice.edu> | 2019-11-04 10:39:35 -0600 |
---|---|---|
committer | Mark Wielaard <mark@klomp.org> | 2019-11-08 14:55:15 +0100 |
commit | 99c5ba406474c87f670a64c69bfd692a0c9583c9 (patch) | |
tree | 05273e33c620597c0a6e4255b3ef607bdf65acc6 /libdw | |
parent | 09c9e8091c36eff7f1f4220ac12afe66d0322c59 (diff) |
libdw: Add and use a concurrent version of the dynamic-size hash table.
Signed-off-by: Srđan Milaković <sm108@rice.edu>
Signed-off-by: Mark Wielaard <mark@klomp.org>
Diffstat (limited to 'libdw')
-rw-r--r-- | libdw/ChangeLog | 12 | ||||
-rw-r--r-- | libdw/dwarf_abbrev_hash.c | 2 | ||||
-rw-r--r-- | libdw/dwarf_abbrev_hash.h | 3 | ||||
-rw-r--r-- | libdw/dwarf_formref_die.c | 2 | ||||
-rw-r--r-- | libdw/dwarf_getabbrev.c | 2 | ||||
-rw-r--r-- | libdw/dwarf_sig8_hash.c | 2 | ||||
-rw-r--r-- | libdw/dwarf_sig8_hash.h | 9 | ||||
-rw-r--r-- | libdw/dwarf_tag.c | 2 |
8 files changed, 25 insertions, 9 deletions
diff --git a/libdw/ChangeLog b/libdw/ChangeLog index b1f73bc8..2bcb642f 100644 --- a/libdw/ChangeLog +++ b/libdw/ChangeLog @@ -1,3 +1,15 @@ +2019-10-28 Mark Wielaard <mark@klomp.org> + + * dwarf_sig8_hash.h: Include libdw.h. Remove COMPARE. Include + dynamicsizehash_concurrent.h. + * dwarf_sig8_hash.c: Include dynamicsizehash_concurrent.c. + * dwarf_formref_die.c (dwarf_formref_die): Drop NULL argument to + Dwarf_Sig8_Hash_find. + +2019-08-26 Srđan Milaković <sm108@rice.edu@rice.edu> + + * dwarf_abbrev_hash.{c,h}: Use the *_concurrent hash table. + 2019-11-01 Jonathon Anderson <jma14@rice.edu> * dwarf_begin_elf.c (valid_p): Switch calloc for malloc for fake CUs. diff --git a/libdw/dwarf_abbrev_hash.c b/libdw/dwarf_abbrev_hash.c index f52f5ad5..c2548140 100644 --- a/libdw/dwarf_abbrev_hash.c +++ b/libdw/dwarf_abbrev_hash.c @@ -38,7 +38,7 @@ #define next_prime __libdwarf_next_prime extern size_t next_prime (size_t) attribute_hidden; -#include <dynamicsizehash.c> +#include <dynamicsizehash_concurrent.c> #undef next_prime #define next_prime attribute_hidden __libdwarf_next_prime diff --git a/libdw/dwarf_abbrev_hash.h b/libdw/dwarf_abbrev_hash.h index d2f02ccc..a368c598 100644 --- a/libdw/dwarf_abbrev_hash.h +++ b/libdw/dwarf_abbrev_hash.h @@ -32,8 +32,7 @@ #define NAME Dwarf_Abbrev_Hash #define TYPE Dwarf_Abbrev * -#define COMPARE(a, b) (0) -#include <dynamicsizehash.h> +#include <dynamicsizehash_concurrent.h> #endif /* dwarf_abbrev_hash.h */ diff --git a/libdw/dwarf_formref_die.c b/libdw/dwarf_formref_die.c index f196331a..48ba8194 100644 --- a/libdw/dwarf_formref_die.c +++ b/libdw/dwarf_formref_die.c @@ -83,7 +83,7 @@ dwarf_formref_die (Dwarf_Attribute *attr, Dwarf_Die *result) have to match in the type unit headers. */ uint64_t sig = read_8ubyte_unaligned (cu->dbg, attr->valp); - cu = Dwarf_Sig8_Hash_find (&cu->dbg->sig8_hash, sig, NULL); + cu = Dwarf_Sig8_Hash_find (&cu->dbg->sig8_hash, sig); if (cu == NULL) { /* Not seen before. We have to scan through the type units. diff --git a/libdw/dwarf_getabbrev.c b/libdw/dwarf_getabbrev.c index 6a7e981b..7e767fc1 100644 --- a/libdw/dwarf_getabbrev.c +++ b/libdw/dwarf_getabbrev.c @@ -83,7 +83,7 @@ __libdw_getabbrev (Dwarf *dbg, struct Dwarf_CU *cu, Dwarf_Off offset, bool foundit = false; Dwarf_Abbrev *abb = NULL; if (cu == NULL - || (abb = Dwarf_Abbrev_Hash_find (&cu->abbrev_hash, code, NULL)) == NULL) + || (abb = Dwarf_Abbrev_Hash_find (&cu->abbrev_hash, code)) == NULL) { if (result == NULL) abb = libdw_typed_alloc (dbg, Dwarf_Abbrev); diff --git a/libdw/dwarf_sig8_hash.c b/libdw/dwarf_sig8_hash.c index 043cac78..777f9ebc 100644 --- a/libdw/dwarf_sig8_hash.c +++ b/libdw/dwarf_sig8_hash.c @@ -38,4 +38,4 @@ #define next_prime __libdwarf_next_prime extern size_t next_prime (size_t) attribute_hidden; -#include <dynamicsizehash.c> +#include <dynamicsizehash_concurrent.c> diff --git a/libdw/dwarf_sig8_hash.h b/libdw/dwarf_sig8_hash.h index 705ffbcd..c399919a 100644 --- a/libdw/dwarf_sig8_hash.h +++ b/libdw/dwarf_sig8_hash.h @@ -29,10 +29,15 @@ #ifndef _DWARF_SIG8_HASH_H #define _DWARF_SIG8_HASH_H 1 +#ifdef HAVE_CONFIG_H +# include <config.h> +#endif + +#include "libdw.h" + #define NAME Dwarf_Sig8_Hash #define TYPE struct Dwarf_CU * -#define COMPARE(a, b) (0) -#include <dynamicsizehash.h> +#include <dynamicsizehash_concurrent.h> #endif /* dwarf_sig8_hash.h */ diff --git a/libdw/dwarf_tag.c b/libdw/dwarf_tag.c index 331eaa0d..d784970c 100644 --- a/libdw/dwarf_tag.c +++ b/libdw/dwarf_tag.c @@ -45,7 +45,7 @@ __libdw_findabbrev (struct Dwarf_CU *cu, unsigned int code) return DWARF_END_ABBREV; /* See whether the entry is already in the hash table. */ - abb = Dwarf_Abbrev_Hash_find (&cu->abbrev_hash, code, NULL); + abb = Dwarf_Abbrev_Hash_find (&cu->abbrev_hash, code); if (abb == NULL) while (cu->last_abbrev_offset != (size_t) -1l) { |