From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12257 invoked by alias); 22 Nov 2009 04:39:47 -0000 Mailing-List: contact archer-help@sourceware.org; run by ezmlm Sender: Precedence: bulk List-Post: List-Help: List-Subscribe: List-Id: Received: (qmail 12248 invoked by uid 22791); 22 Nov 2009 04:39:46 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Date: Sun, 22 Nov 2009 04:39:00 -0000 From: Daniel Jacobowitz To: Tom Tromey Cc: Cary Coutant , Dodji Seketeli , GDB/Archer list Subject: Re: [RFC] Proposal for a new DWARF name index section Message-ID: <20091122043837.GA16996@caradoc.them.org> References: <4A7FE28D.4050901@redhat.com> <4A8D8868.3010302@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) X-SW-Source: 2009-q4/txt/msg00066.txt.bz2 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