From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22057 invoked by alias); 26 Feb 2004 23:05:18 -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 22046 invoked from network); 26 Feb 2004 23:05:16 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sources.redhat.com with SMTP; 26 Feb 2004 23:05:16 -0000 Received: from drow by nevyn.them.org with local (Exim 4.30 #1 (Debian)) id 1AwUZ9-0002Y2-KR; Thu, 26 Feb 2004 18:05:15 -0500 Date: Thu, 26 Feb 2004 23:05:00 -0000 From: Daniel Jacobowitz To: Elena Zannoni Cc: Jim Blandy , gdb-patches@sources.redhat.com Subject: Re: [RFA/dwarf] Allocate abbrevs from a new obstack Message-ID: <20040226230515.GB8487@nevyn.them.org> Mail-Followup-To: Elena Zannoni , Jim Blandy , gdb-patches@sources.redhat.com References: <20040225035543.GA13672@nevyn.them.org> <16446.29085.601789.628010@localhost.redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <16446.29085.601789.628010@localhost.redhat.com> User-Agent: Mutt/1.5.1i X-SW-Source: 2004-02/txt/msg00787.txt.bz2 On Thu, Feb 26, 2004 at 05:22:21PM -0500, Elena Zannoni wrote: > Jim Blandy writes: > > > > Daniel Jacobowitz writes: > > > Another independent performance optimization from my profiling. This one is > > > good for several percent speedup on mainline. My original description: > > > > > > - It plugs a huge memory leak. After loading partial symbols for > > > libc, GDB uses 5.6MB memory without this patch and 1.6MB with it. > > > We weren't emptying the abbrev table. > > > > > > [Specifically, we were emptying it after dwarf2_build_psymtabs_hard, > > > instead of once each time through the loop. dwarf2_read_abbrevs then > > > zeroed out the allocated, unreferenced pointers.] > > > > > > - I spent a lot of time trying to find alternate data structures that > > > would be more efficient. The expandable hash table is slower, even if > > > you initially allocate it to the right size. The splay tree I expected > > > to be quite good in this case, but it isn't either; the overhead is simply > > > too high. The fixed-size ad-hoc hash table appears to be the best we can > > > do. > > > > > > Tested on i686-pc-linux-gnu, no regressions. OK to commit? > > > > Looks great --- please do. > > Jim, there was agreement to not touch these central files until after > the branch. Was there? The closest I saw was an agreement not to merge intercu support. This patch is not particularly important, or the other optimization patch, but they are independent of that. I would like to see the duplicate symbols patch reviewed before the branch. In any case, I won't commit this one until after the branch - which I think is coming up in about an hour. -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer