public inbox for archer-commits@sourceware.org help / color / mirror / Atom feed
From: jkratoch@sourceware.org To: archer-commits@sourceware.org Subject: [SCM] users/jkratoch/dwarf5readelf-indexcxx-debugnames: . Date: Sat, 07 Jan 2017 20:01:00 -0000 [thread overview] Message-ID: <20170107200100.60621.qmail@sourceware.org> (raw) 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.
reply other threads:[~2017-01-07 20:01 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20170107200100.60621.qmail@sourceware.org \ --to=jkratoch@sourceware.org \ --cc=archer-commits@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).