From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22935 invoked by alias); 13 Jun 2002 19:29:45 -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 22911 invoked from network); 13 Jun 2002 19:29:40 -0000 Received: from unknown (HELO nevyn.them.org) (66.19.120.58) by sources.redhat.com with SMTP; 13 Jun 2002 19:29:40 -0000 Received: from drow by nevyn.them.org with local (Exim 3.35 #1 (Debian)) id 17IaIK-0001ps-00 for ; Thu, 13 Jun 2002 15:30:08 -0400 Date: Thu, 13 Jun 2002 12:29:00 -0000 From: Daniel Jacobowitz To: gdb-patches@sources.redhat.com Subject: Re: PATCH: per-inferior register cache for gdbserver Message-ID: <20020613193000.GA6124@nevyn.them.org> Mail-Followup-To: gdb-patches@sources.redhat.com References: <20020420132315.A20532@nevyn.them.org> <3CC1B811.5000304@cygnus.com> <20020420145943.A25321@nevyn.them.org> <3CC2147B.1040100@cygnus.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3CC2147B.1040100@cygnus.com> User-Agent: Mutt/1.5.1i X-SW-Source: 2002-06/txt/msg00231.txt.bz2 On Sat, Apr 20, 2002 at 09:23:07PM -0400, Andrew Cagney wrote: > >Um, would there be more benefit in getting this sort of thing > >>implemented in the core of GDB? I just don't see a per-lwp cache in the > >>remote target making much difference to GDB's thread debugging > >>performance. > > > >I can get numbers later on how many register fetches it > >actually saves; I suspect it's fairly small. > > Can you please add a comment to the code explaining this - it more of a > design benefit than a performance benefit (the performance gains are > unknown). Good idea, done. -- Daniel Jacobowitz Carnegie Mellon University MontaVista Software Debian GNU/Linux Developer 2002-06-13 Daniel Jacobowitz * gdbserver/regcache.c: Add comment. Index: regcache.c =================================================================== RCS file: /cvs/src/src/gdb/gdbserver/regcache.c,v retrieving revision 1.5 diff -u -p -r1.5 regcache.c --- regcache.c 11 Jun 2002 17:32:39 -0000 1.5 +++ regcache.c 13 Jun 2002 19:28:07 -0000 @@ -25,6 +25,10 @@ #include #include +/* The private data for the register cache. Note that we have one + per inferior; this is primarily for simplicity, as the performance + benefit is minimal. */ + struct inferior_regcache_data { int registers_valid;