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: Daniel Jacobowitz <drow at false dot org>
- To: Tom Tromey <tromey at redhat dot com>
- Cc: Cary Coutant <ccoutant at google dot com>, Dodji Seketeli <dodji at redhat dot com>,GDB/Archer list <archer at sourceware dot org>
- Date: Sat, 21 Nov 2009 23:38:38 -0500
- 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>
On Fri, Nov 20, 2009 at 10:24:38AM -0700, Tom Tromey wrote:
> I agree we could read the DIE and look at the tag. However, that means
> disk access to read the DIE, and disk access to read in the abbrev
> table. That seems very expensive for what is supposed to be a quick
> index lookup.
If you had a sufficiently smart consumer that it didn't need to keep
all of .debug_info in memory all the time, then this would have some
measurable impact. But GDB isn't that consumer. If you've got the
.debug_info section read in or mapped anyway (one-time operation),
then checking the DIE tag is not too bad. It will be a cache miss, of
course.
If you don't read this data off disk when reading the pubnames, you'll
have to do it the first time one of them is referenced, anyway. This
is separate from parsing all the DIEs (psymtabs), which is much more
work.
Someone suggested on gdb-patches that GDB could generate and cache the
pubnames table. It follows that a separate packaging tool could do so
also. Something to consider... during separate debug file generation,
for instance.
--
Daniel Jacobowitz
CodeSourcery