From: "Laurent Desnogues" <laurent.desnogues@gmail.com>
To: qemu-devel@nongnu.org
Subject: Re: Hash table based symbol lookup (was: Re: [Qemu-devel] [PATCH] Fix symbol lookup for mips64* targets)
Date: Mon, 6 Oct 2008 18:28:41 +0200 [thread overview]
Message-ID: <761ea48b0810060928p5f97e03cx7c43cbc1a75a0d6a@mail.gmail.com> (raw)
In-Reply-To: <f43fc5580810060911m5d5bafchec77cfcb56ad824d@mail.gmail.com>
On Mon, Oct 6, 2008 at 6:11 PM, Blue Swirl <blauwirbel@gmail.com> wrote:
>
> I hope I'm wrong, but it looks like in the worst case, for each byte
> that the symbol covers, this implementation can allocate a structure
> of tens of bytes in size. I wonder what the symbols of 1.5MB
> openbios-sparc64 would take.
No, you're right: for each byte of a function a structure of about
5 * ptr size is allocated. In your case, that'd be about 60 MB.
It's bad and can probably be reduced. But just try to run in
debug mode (-d) any application that has thousands of
symbols and you'll soon see you have to disable symbol
lookup as its complexity is linear.
I can reduce memory consumption but its size will still be a
multiple of the text segment size.
Laurent
next prev parent reply other threads:[~2008-10-06 16:28 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-06 10:29 Hash table based symbol lookup (was: Re: [Qemu-devel] [PATCH] Fix symbol lookup for mips64* targets) Laurent Desnogues
2008-10-06 16:11 ` Blue Swirl
2008-10-06 16:28 ` Laurent Desnogues [this message]
2008-10-07 6:48 ` Laurent Desnogues
2008-10-07 17:50 ` Blue Swirl
2008-10-07 19:34 ` Laurent Desnogues
2008-10-07 21:34 ` Laurent Desnogues
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=761ea48b0810060928p5f97e03cx7c43cbc1a75a0d6a@mail.gmail.com \
--to=laurent.desnogues@gmail.com \
--cc=qemu-devel@nongnu.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: 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 NNTP newsgroup(s).