From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32681 invoked by alias); 9 Mar 2004 19:58:08 -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 32674 invoked from network); 9 Mar 2004 19:58:07 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sources.redhat.com with SMTP; 9 Mar 2004 19:58:07 -0000 Received: from drow by nevyn.them.org with local (Exim 4.30 #1 (Debian)) id 1B0nMc-0007JY-OD; Tue, 09 Mar 2004 14:58:06 -0500 Date: Fri, 19 Mar 2004 00:09:00 -0000 From: Daniel Jacobowitz To: gdb-patches@sources.redhat.com Cc: Jim Blandy Subject: Re: [RFA/dwarf] Optimize partial DIE reading for uninteresting DIEs Message-ID: <20040309195806.GA18334@nevyn.them.org> Mail-Followup-To: gdb-patches@sources.redhat.com, Jim Blandy References: <20040225030644.GA5167@nevyn.them.org> <20040226231255.GC8487@nevyn.them.org> <20040227030310.GA24230@nevyn.them.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040227030310.GA24230@nevyn.them.org> User-Agent: Mutt/1.5.1i X-SW-Source: 2004-03/txt/msg00209.txt.bz2 On Thu, Feb 26, 2004 at 10:03:10PM -0500, Daniel Jacobowitz wrote: > On Thu, Feb 26, 2004 at 09:58:32PM -0500, Jim Blandy wrote: > > > > Daniel Jacobowitz writes: > > > You're mistaken about the expense. In particular read_unsigned_leb128 > > > is much slower than skip_uleb128 because of the computations to build > > > the result; IIRC variable shifts are expensive. Yes, this was measured > > > with an optimized build and a non-intrusive profiler. There's also the > > > different memory access patterns. > > > > No kidding. I'm amazed. Okay. > > > > > Most of the speedup comes from not reading in the attribute values, > > > though. > > > > If what you say above is so, then two distinct versions of the > > attribute traversal are clearly called for. > > > > It would be interesting to compare profiling results between two GDB's > > that differ only in whether they use your attribute skipper or the > > attribute value reader. > > For this patch, the changes were pretty small. For the larger change, > with just partial symbol table reading, read_unsigned_leb128 dropped > way down and skip_leb128 didn't climb equally far up. > > Let me reproduce those results, though. Something seems suspicious. Nah, seems good, although the difference is just a few percent at most; I trust from my earlier measurements that it will make more of a difference down the road. I've checked this in to HEAD. -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32681 invoked by alias); 9 Mar 2004 19:58:08 -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 32674 invoked from network); 9 Mar 2004 19:58:07 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sources.redhat.com with SMTP; 9 Mar 2004 19:58:07 -0000 Received: from drow by nevyn.them.org with local (Exim 4.30 #1 (Debian)) id 1B0nMc-0007JY-OD; Tue, 09 Mar 2004 14:58:06 -0500 Date: Tue, 09 Mar 2004 19:58:00 -0000 From: Daniel Jacobowitz To: gdb-patches@sources.redhat.com Cc: Jim Blandy Subject: Re: [RFA/dwarf] Optimize partial DIE reading for uninteresting DIEs Message-ID: <20040309195806.GA18334@nevyn.them.org> Mail-Followup-To: gdb-patches@sources.redhat.com, Jim Blandy References: <20040225030644.GA5167@nevyn.them.org> <20040226231255.GC8487@nevyn.them.org> <20040227030310.GA24230@nevyn.them.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040227030310.GA24230@nevyn.them.org> User-Agent: Mutt/1.5.1i X-SW-Source: 2004-03.o/txt/msg00209.txt Message-ID: <20040309195800.H0S2MvTI0bqob7JuDVIDF77i0O-Do00Tf8sHGvVBSj4@z> On Thu, Feb 26, 2004 at 10:03:10PM -0500, Daniel Jacobowitz wrote: > On Thu, Feb 26, 2004 at 09:58:32PM -0500, Jim Blandy wrote: > > > > Daniel Jacobowitz writes: > > > You're mistaken about the expense. In particular read_unsigned_leb128 > > > is much slower than skip_uleb128 because of the computations to build > > > the result; IIRC variable shifts are expensive. Yes, this was measured > > > with an optimized build and a non-intrusive profiler. There's also the > > > different memory access patterns. > > > > No kidding. I'm amazed. Okay. > > > > > Most of the speedup comes from not reading in the attribute values, > > > though. > > > > If what you say above is so, then two distinct versions of the > > attribute traversal are clearly called for. > > > > It would be interesting to compare profiling results between two GDB's > > that differ only in whether they use your attribute skipper or the > > attribute value reader. > > For this patch, the changes were pretty small. For the larger change, > with just partial symbol table reading, read_unsigned_leb128 dropped > way down and skip_leb128 didn't climb equally far up. > > Let me reproduce those results, though. Something seems suspicious. Nah, seems good, although the difference is just a few percent at most; I trust from my earlier measurements that it will make more of a difference down the road. I've checked this in to HEAD. -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer