From: Giuliano Procida <gprocida@google.com>
To: Matthias Maennich <maennich@google.com>
Cc: libabigail@sourceware.org, Dodji Seketeli <dodji@seketeli.org>,
kernel-team@android.com
Subject: Re: [PATCH] dwarf-reader: Use high bits of Bloom filter words.
Date: Wed, 18 Mar 2020 12:13:20 +0000 [thread overview]
Message-ID: <CAGvU0Hm86J=vtPuzo3d+8QHfd_tocxtGeyRMN5ZKPjkX9P4zbg@mail.gmail.com> (raw)
In-Reply-To: <20200318113754.GI211970@google.com>
Will do.
I'll also change the commit name s/high/all/.
Giuliano.
On Wed, 18 Mar 2020 at 11:37, Matthias Maennich <maennich@google.com> wrote:
>
> Hi!
>
> On Wed, Mar 18, 2020 at 10:20:55AM +0000, Android Kernel Team wrote:
> >Most of the bit values used for GNU hash ELF section Bloom filtering
> >were being ignored due to integer narrowing, reducing missing symbol
> >filtering efficiency considerably.
>
> Nice! Maybe add the analysis result from the other mail thread to point
> out the improvement made here (and the justification for this change).
>
> >
> >This patch fixes this.
> >
> > * src/abg-dwarf-reader.cc (lookup_symbol_from_gnu_hash_tab):
> > Don't narrow calculated Bloom word to 8 bits before using it
> > to mask the fetched Bloom word.
> Please sign off your work.
>
> Reviewed-by: Matthias Maennich <maennich@google.com>
>
> Cheers,
> Matthias
>
> >---
> > src/abg-dwarf-reader.cc | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> >diff --git a/src/abg-dwarf-reader.cc b/src/abg-dwarf-reader.cc
> >index 3454fcf5..5556bde5 100644
> >--- a/src/abg-dwarf-reader.cc
> >+++ b/src/abg-dwarf-reader.cc
> >@@ -2025,7 +2025,7 @@ lookup_symbol_from_gnu_hash_tab(const environment* env,
> > // filter, in bits.
> > int c = get_elf_class_size_in_bytes(elf_handle) * 8;
> > int n = (h1 / c) % ht.bf_nwords;
> >- unsigned char bitmask = (1ul << (h1 % c)) | (1ul << (h2 % c));
> >+ GElf_Word bitmask = (1ul << (h1 % c)) | (1ul << (h2 % c));
> >
> > // Test if the symbol is *NOT* present in this ELF file.
> > if ((bloom_word_at(elf_handle, ht.bloom_filter, n) & bitmask) != bitmask)
> >--
> >2.25.1.481.gfbce0eb801-goog
> >
> >
prev parent reply other threads:[~2020-03-18 12:13 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-18 10:20 Giuliano Procida
2020-03-18 11:37 ` Matthias Maennich
2020-03-18 12:12 ` [PATCH v2] dwarf-reader: Use all " Giuliano Procida
2020-03-19 10:20 ` Dodji Seketeli
2020-03-19 10:46 ` Giuliano Procida
2020-03-19 11:05 ` Matthias Männich
2020-03-19 15:17 ` Dodji Seketeli
2020-03-18 12:13 ` Giuliano Procida [this message]
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='CAGvU0Hm86J=vtPuzo3d+8QHfd_tocxtGeyRMN5ZKPjkX9P4zbg@mail.gmail.com' \
--to=gprocida@google.com \
--cc=dodji@seketeli.org \
--cc=kernel-team@android.com \
--cc=libabigail@sourceware.org \
--cc=maennich@google.com \
/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: link
Be 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).