From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11192 invoked by alias); 5 Mar 2004 02:55:05 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 11183 invoked from network); 5 Mar 2004 02:55:04 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sources.redhat.com with SMTP; 5 Mar 2004 02:55:04 -0000 Received: from drow by nevyn.them.org with local (Exim 4.30 #1 (Debian)) id 1Az5UO-0001QC-9u; Thu, 04 Mar 2004 21:55:04 -0500 Date: Fri, 05 Mar 2004 02:55:00 -0000 From: Daniel Jacobowitz To: gdb-patches@sources.redhat.com, Jim Blandy , Elena Zannoni Subject: Re: [RFA/dwarf] Don't process types multiple times Message-ID: <20040305025504.GA5320@nevyn.them.org> Mail-Followup-To: gdb-patches@sources.redhat.com, Jim Blandy , Elena Zannoni References: <20040225044206.GA23242@nevyn.them.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040225044206.GA23242@nevyn.them.org> User-Agent: Mutt/1.5.1i X-SW-Source: 2004-03.o/txt/msg00079.txt On Tue, Feb 24, 2004 at 11:42:06PM -0500, Daniel Jacobowitz wrote: > This independent patch is a performance and correctness fix for full symbol > processing. My description from the intercu branch posting: > > There are two ways that we can process a general DIE: process_die or > read_type_die. Children of particular DIE types may be processed directly, > but these are the only major dispatch points. It's interesting to notice > that almost everything called from read_type_die starts with "if (die->type) > return": everything but enumeration types and aggregate types, in fact. > This means that if the first reference to an enumeration or aggregate type > is a DW_AT_type or DW_AT_containing_type in a DIE numerically before the > type's DIE, we'll end up calling new_symbol for it twice. > > Fixing this saves about 8% memory and 4% time from gdb -readnow libc.so.6, > a lot of duplicate entries on maint print symbols which I vaguely recall > being confused about but never investigated, and some serious problems for > inter-CU support. Without this, types could be added to the wrong symbol > table. > > Tested i686-pc-linux-gnu, no regressions. OK to commit? Ping. I would like to apply this bug fix for GDB 6.1. -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11192 invoked by alias); 5 Mar 2004 02:55:05 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 11183 invoked from network); 5 Mar 2004 02:55:04 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sources.redhat.com with SMTP; 5 Mar 2004 02:55:04 -0000 Received: from drow by nevyn.them.org with local (Exim 4.30 #1 (Debian)) id 1Az5UO-0001QC-9u; Thu, 04 Mar 2004 21:55:04 -0500 Date: Fri, 19 Mar 2004 00:09:00 -0000 From: Daniel Jacobowitz To: gdb-patches@sources.redhat.com, Jim Blandy , Elena Zannoni Subject: Re: [RFA/dwarf] Don't process types multiple times Message-ID: <20040305025504.GA5320@nevyn.them.org> Mail-Followup-To: gdb-patches@sources.redhat.com, Jim Blandy , Elena Zannoni References: <20040225044206.GA23242@nevyn.them.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040225044206.GA23242@nevyn.them.org> User-Agent: Mutt/1.5.1i X-SW-Source: 2004-03/txt/msg00079.txt.bz2 Message-ID: <20040319000900.iKpjSISR3hSbudzPBJNtQS_tGDLICHJi4VBaAS3ygLM@z> On Tue, Feb 24, 2004 at 11:42:06PM -0500, Daniel Jacobowitz wrote: > This independent patch is a performance and correctness fix for full symbol > processing. My description from the intercu branch posting: > > There are two ways that we can process a general DIE: process_die or > read_type_die. Children of particular DIE types may be processed directly, > but these are the only major dispatch points. It's interesting to notice > that almost everything called from read_type_die starts with "if (die->type) > return": everything but enumeration types and aggregate types, in fact. > This means that if the first reference to an enumeration or aggregate type > is a DW_AT_type or DW_AT_containing_type in a DIE numerically before the > type's DIE, we'll end up calling new_symbol for it twice. > > Fixing this saves about 8% memory and 4% time from gdb -readnow libc.so.6, > a lot of duplicate entries on maint print symbols which I vaguely recall > being confused about but never investigated, and some serious problems for > inter-CU support. Without this, types could be added to the wrong symbol > table. > > Tested i686-pc-linux-gnu, no regressions. OK to commit? Ping. I would like to apply this bug fix for GDB 6.1. -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer