From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32390 invoked by alias); 26 Feb 2004 22:27:14 -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 32381 invoked from network); 26 Feb 2004 22:27:13 -0000 Received: from unknown (HELO localhost.redhat.com) (66.30.197.194) by sources.redhat.com with SMTP; 26 Feb 2004 22:27:13 -0000 Received: by localhost.redhat.com (Postfix, from userid 469) id A94631A448A; Thu, 26 Feb 2004 17:22:21 -0500 (EST) From: Elena Zannoni MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <16446.29085.601789.628010@localhost.redhat.com> Date: Thu, 26 Feb 2004 22:27:00 -0000 To: Jim Blandy Cc: Daniel Jacobowitz , gdb-patches@sources.redhat.com, Elena Zannoni Subject: Re: [RFA/dwarf] Allocate abbrevs from a new obstack In-Reply-To: References: <20040225035543.GA13672@nevyn.them.org> X-SW-Source: 2004-02/txt/msg00780.txt.bz2 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.