This is the mail archive of the
archer@sourceware.org
mailing list for the Archer project.
Re: [RFC] Proposal for a new DWARF name index section
- From: Tom Tromey <tromey at redhat dot com>
- To: Cary Coutant <ccoutant at google dot com>
- Cc: Dodji Seketeli <dodji at redhat dot com>, "GDB\/Archer list" <archer at sourceware dot org>
- Date: Tue, 01 Dec 2009 12:13:47 -0700
- Subject: Re: [RFC] Proposal for a new DWARF name index section
- References: <4A7FE28D.4050901@redhat.com> <4A8D8868.3010302@redhat.com><c17be2b30911171545k302106bfuf526378d52e0a324@mail.gmail.com><m3tywp9kix.fsf@fleche.redhat.com>
- Reply-to: Tom Tromey <tromey at redhat dot com>
>>> As a follow up to this proposal, I have opened an enhancement request in
>>> the gcc bugzilla at http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41130 .
Cary> It seems to me that the .debug_pubnames/pubtypes/aranges sections were
Cary> created specifically so that the debugger could have fast access
Cary> without having to pre-read all the debug info, so the idea of creating
Cary> a new section rather than fix the one we already have is questionable.
Tom> Yes, I agree it would be ideal not to do this.
I still haven't implemented pubtypes/pubnames reading, but I did run
across a couple of other problems not solved by those. I'd like to get
people's reactions.
To reiterate a little, my goal here is maximal performance. Ideally,
the initial read would be very fast -- fast than the user can perceive.
This is probably not achievable, but we can get close.
The biggest fixable performance problem in the current reader is
actually computing the hash codes for the strings from the
.debug_gnu_index section. So, I've been thinking about putting the hash
code directly into the section.
The other problem I've noticed is name canonicalization. This past
year, we changed gdb to canonicalize names in its symbol tables, and to
canonicalize user input before doing lookups. This lets gdb return the
right answer even when the order of modifiers varies. This change
slowed down DWARF reading, and it occurred to me that it would also
substantially slow down index reading. So, I would also like to change
the .debug_gnu_index spec to specify how names are to be canonicalized.
The hash code idea seems a little weird to me, but the name
canonicalization problem seems important to solve.
Tom