public inbox for archer-commits@sourceware.org
help / color / mirror / Atom feed
* [SCM] users/jkratoch/dwarf5readelf-indexcxx-debugnames: .
@ 2017-01-07 20:01 jkratoch
0 siblings, 0 replies; only message in thread
From: jkratoch @ 2017-01-07 20:01 UTC (permalink / raw)
To: archer-commits
The branch, users/jkratoch/dwarf5readelf-indexcxx-debugnames has been updated
via ec55f88e5cd29bb9555047ed5986dfb88635cb4a (commit)
from 8ca64c9f87567007af4a5714b0b7b78613e5fcfa (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email.
- Log -----------------------------------------------------------------
commit ec55f88e5cd29bb9555047ed5986dfb88635cb4a
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Sat Jan 7 20:59:47 2017 +0100
.
-----------------------------------------------------------------------
Summary of changes:
binutils/dwarf.c | 39 +++++++++++++++++++++++++++++++++++++--
1 files changed, 37 insertions(+), 2 deletions(-)
First 500 lines of diff:
diff --git a/binutils/dwarf.c b/binutils/dwarf.c
index d87f39d..75af30d 100644
--- a/binutils/dwarf.c
+++ b/binutils/dwarf.c
@@ -6900,9 +6900,9 @@ display_debug_names (struct dwarf_section *section, void *file)
putchar ('\n');
}
- // const uint32_t *const hash_table_buckets = (uint32_t *) hdrptr;
+ const uint32_t *const hash_table_buckets = (uint32_t *) hdrptr;
hdrptr += bucket_count * sizeof (uint32_t);
- // const uint32_t *const hash_table_hashes = (uint32_t *) hdrptr;
+ const uint32_t *const hash_table_hashes = (uint32_t *) hdrptr;
hdrptr += name_count * sizeof (uint32_t);
const void *const name_table_string_offsets = hdrptr;
hdrptr += name_count * offset_size;
@@ -6921,6 +6921,41 @@ display_debug_names (struct dwarf_section *section, void *file)
return 0;
}
+ size_t buckets_filled = 0;
+ size_t bucketi;
+ for (bucketi = 0; bucketi < bucket_count; bucketi++)
+ {
+ const uint32_t bucket = hash_table_buckets[bucketi];
+
+ if (bucket != 0)
+ ++buckets_filled;
+ }
+ printf (_("Filled %zu of %lu buckets.\n"), buckets_filled,
+ (unsigned long) bucket_count);
+
+ uint32_t hash_prev;
+ size_t clash_count = 0;
+ size_t longest_clash = 0;
+ size_t this_length;
+ size_t hashi;
+ for (hashi = 0; hashi < name_count; hashi++)
+ {
+ const uint32_t hash_this = hash_table_hashes[hashi];
+
+ if (hashi > 0 && hash_prev == hash_this)
+ {
+ ++clash_count;
+ ++this_length;
+ longest_clash = MAX (longest_clash, this_length);
+ }
+ else
+ this_length = 0;
+ hash_prev = hash_this;
+ }
+ printf (_("Out of %lu names there are %zu clashes "
+ "(longest of %zu entries).\n"),
+ (unsigned long) name_count, clash_count, longest_clash);
+
struct abbrev_lookup_entry
{
dwarf_vma abbrev_tag;
hooks/post-receive
--
Repository for Project Archer.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-01-07 20:01 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-07 20:01 [SCM] users/jkratoch/dwarf5readelf-indexcxx-debugnames: jkratoch
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).