This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: PATCH: per-inferior register cache for gdbserver
- From: Daniel Jacobowitz <drow at mvista dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: Thu, 13 Jun 2002 15:30:00 -0400
- Subject: Re: PATCH: per-inferior register cache for gdbserver
- References: <20020420132315.A20532@nevyn.them.org> <3CC1B811.5000304@cygnus.com> <20020420145943.A25321@nevyn.them.org> <3CC2147B.1040100@cygnus.com>
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 <drow@mvista.com>
* 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 <stdlib.h>
#include <string.h>
+/* 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;