This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [rfa/dwarf] Support for attributes pointing to a different CU
- From: Jim Blandy <jimb at redhat dot com>
- To: Daniel Jacobowitz <drow at false dot org>
- Cc: gdb-patches at sources dot redhat dot com
- Date: 04 Oct 2004 17:08:36 -0500
- Subject: Re: [rfa/dwarf] Support for attributes pointing to a different CU
- References: <20040923045723.GA11871@nevyn.them.org><vt2u0tobpf1.fsf@zenia.home> <20040924003412.GB10500@nevyn.them.org><vt2oejqm2zq.fsf@zenia.home> <20041004004111.GD3234@nevyn.them.org>
This patch still avoids building the all_comp_units table if it never
finds a CU whose abbrev table suggests it might contain inter-CU
references. What I was actually suggesting was building
all_comp_units for every objfile, unconditionally --- even for
objfiles with no inter-CU references, and which will thus never use
the table.
The win would be to remove the case of an absent all_comp_units table
from the code. I want to keep the number of different cases one needs
to think about down where doing so doesn't provide a noticeable
performance hit.
On an 8000-CU objfile (what you estimated glibc compiled with
duplicate elimination would have), that would be a memory overhead of
160k, which doesn't seem bad. It's true that that would be a separate
pass over the .debug_info section, but the latest patch will do two
passes anyway.
The quadratic bit in create_all_comp_units to recover the psymtabs
we'd already created wouldn't be needed any more.