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 16:14:24 -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><vt2is9xx8wg.fsf@zenia.home> <20041003161221.GA3234@nevyn.them.org>
Daniel Jacobowitz <drow@false.org> writes:
> On Wed, Sep 29, 2004 at 12:49:35PM -0500, Jim Blandy wrote:
> > Since we never toss types anyway, would it make sense to move
> > type_hash to dwarf2_per_objfile?
>
> I don't think so. type_hash is used in two ways: individual items are
> set, when we know which CU we ought to have, and a whole CU is
> restored, when we know which CU we're restoring. It's always more
> efficient to have a lot of small hash tables if you know precisely
> which one you'll need; fewer collisions.
Really? libiberty/hashtab.c is a resizing hash table; I thought hash
table resizing was supposed to keep the collision rate roughly
constant (modulo hysteresis) regardless of the number of elements. If
that's not so, doesn't that mean your hash function isn't doing its
job spreading the elements across the (adequately sized) table?