From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 40533 invoked by alias); 24 May 2017 07:39:18 -0000 Mailing-List: contact archer-commits-help@sourceware.org; run by ezmlm Sender: Precedence: bulk List-Post: List-Help: List-Subscribe: Received: (qmail 39793 invoked by uid 9674); 24 May 2017 07:39:07 -0000 Date: Wed, 24 May 2017 07:39:00 -0000 Message-ID: <20170524073907.39752.qmail@sourceware.org> From: jkratoch@sourceware.org To: archer-commits@sourceware.org Subject: [SCM] users/jkratoch/indexcxx-nameswrite-namesread: Merge branch 'indexcxx-nameswrite' into indexcxx-nameswrite-namesread X-Git-Refname: refs/heads/users/jkratoch/indexcxx-nameswrite-namesread X-Git-Reftype: branch X-Git-Oldrev: a3b24e5c2984c2e53d6a6b4b64c2a4e570ce4dca X-Git-Newrev: 04e52a9919f508fbcf6bbffcc5339dc9da7bbbc7 X-SW-Source: 2017-q2/txt/msg00031.txt.bz2 List-Id: The branch, users/jkratoch/indexcxx-nameswrite-namesread has been updated via 04e52a9919f508fbcf6bbffcc5339dc9da7bbbc7 (commit) via 49732834154631c8a0d30cd3c0cf1d5809fae98d (commit) from a3b24e5c2984c2e53d6a6b4b64c2a4e570ce4dca (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email. - Log ----------------------------------------------------------------- commit 04e52a9919f508fbcf6bbffcc5339dc9da7bbbc7 Merge: a3b24e5 4973283 Author: Jan Kratochvil Date: Wed May 24 09:38:04 2017 +0200 Merge branch 'indexcxx-nameswrite' into indexcxx-nameswrite-namesread ----------------------------------------------------------------------- Summary of changes: binutils/dwarf.c | 36 ++++++++++++++++++++++-------------- 1 files changed, 22 insertions(+), 14 deletions(-) First 500 lines of diff: diff --git a/binutils/dwarf.c b/binutils/dwarf.c index 7d4a810..cd8c015 100644 --- a/binutils/dwarf.c +++ b/binutils/dwarf.c @@ -7704,8 +7704,9 @@ display_debug_names (struct dwarf_section *section, void *file) printf (" %02x", uc); } putchar ('\n'); + putchar ('\n'); - printf (_("\nCU table:\n")); + printf (_("CU table:\n")); for (i = 0; i < comp_unit_count; i++) { uint64_t cu_offset; @@ -7713,8 +7714,9 @@ display_debug_names (struct dwarf_section *section, void *file) SAFE_BYTE_GET_AND_INC (cu_offset, hdrptr, offset_size, unit_end); printf (_("[%3u] 0x%lx\n"), i, (unsigned long) cu_offset); } + putchar ('\n'); - printf (_("\nTU table:\n")); + printf (_("TU table:\n")); for (i = 0; i < local_type_unit_count; i++) { uint64_t tu_offset; @@ -7722,8 +7724,9 @@ display_debug_names (struct dwarf_section *section, void *file) SAFE_BYTE_GET_AND_INC (tu_offset, hdrptr, offset_size, unit_end); printf (_("[%3u] 0x%lx\n"), i, (unsigned long) tu_offset); } + putchar ('\n'); - printf (_("\nForeign TU table:\n")); + printf (_("Foreign TU table:\n")); for (i = 0; i < foreign_type_unit_count; i++) { uint64_t signature; @@ -7733,6 +7736,7 @@ display_debug_names (struct dwarf_section *section, void *file) print_dwarf_vma (signature, 8); putchar ('\n'); } + putchar ('\n'); const uint32_t *const hash_table_buckets = (uint32_t *) hdrptr; hdrptr += bucket_count * sizeof (uint32_t); @@ -7765,11 +7769,11 @@ display_debug_names (struct dwarf_section *section, void *file) if (bucket != 0) ++buckets_filled; } - printf (_("Filled %zu of %lu buckets.\n"), buckets_filled, + printf (_("Used %zu of %lu buckets.\n"), buckets_filled, (unsigned long) bucket_count); uint32_t hash_prev; - size_t clash_count = 0; + size_t hash_clash_count = 0; size_t longest_clash = 0; size_t this_length; size_t hashi; @@ -7777,19 +7781,23 @@ display_debug_names (struct dwarf_section *section, void *file) { const uint32_t hash_this = hash_table_hashes[hashi]; - if (hashi > 0 && hash_prev == hash_this) + if (hashi > 0) { - ++clash_count; - ++this_length; - longest_clash = MAX (longest_clash, this_length); + if (hash_prev % bucket_count == hash_this % bucket_count) + { + ++hash_clash_count; + ++this_length; + longest_clash = MAX (longest_clash, this_length); + } + else + this_length = 0; } - 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); + printf (_("Out of %lu items there are %zu bucket clashes" + " (longest of %zu entries).\n"), + (unsigned long) name_count, hash_clash_count, longest_clash); + assert (name_count == buckets_filled + hash_clash_count); struct abbrev_lookup_entry { hooks/post-receive -- Repository for Project Archer.