This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: PATCH: fail to improve psymtab memory consumption
Andrew Cagney <ac131313@cygnus.com> writes:
>>> Does this require serial or random file i/o?
>> ... you could make fread use mmap
>> in special cases, but they don't happen enough in practice to make
>> fread fast enough to beat mmap.
>
>
> It may not happen enough to ``beat mmap'', it certainly happens enough
> to justify the implementation of FILE using V/M based schema.
Err, what?
You must not have looked at most pieces of software that access disk
these days. Most use mmap when possible.
>
> Anyway, that isn't the objective. The objective is to get the dwarf2
> reader clean simple and pragmatically fast. Fast, at all cost, is
> like micro-optomizing using STREQ() macros.
Which i'm opposed to completely, and you know this (I replaced quite a
few when a lot of STREQ->strcmp_iw changes went in, instead of
STREQ->STREQ_IW)
Comparing using MMAP to micro-optimizing is trivializing it in the extreme.
If you really think it's a micro optimization, once again, I invite
you to *try* it.
>If you think there should
> be a mmap implementation then abstract it out so that dwarf2 uses it
> rather than contains it.
It does.
If configure says we have MMAP, we use MMAP.
What's the problem?
Where do you think this abstraction should take place? BFD?
>
> If you think there should be MMAP, then get it added to BFD where all
> readers will benefit, not just DWARF2.
This is tricky, because of the hell that is BFD.
Apple's tried it, i've tried it, etc.
Because of hacks and kludges for in-memory stuff in BFD, it breaks
things.
>
>
> Andrew
--
"I like to go to art museums and name the untitled paintings...
Boy With Pail... Kitten On Fire.
"-Steven Wright