This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: additional vector function to improve register fetch performance
- To: jtc at redback dot com
- Subject: Re: additional vector function to improve register fetch performance
- From: Andrew Cagney <ac131313 at cygnus dot com>
- Date: Fri, 15 Dec 2000 11:48:48 +1100
- Cc: gdb at sourceware dot cygnus dot com
- References: <5m3dfzj2qs.fsf@jtc.redback.com>
"J.T. Conklin" wrote:
> Might be changed to:
>
> prefetch_sp ();
> prefetch_fp ();
> prefetch_pc ();
> prefetch_register (R0_REGNUM);
> sp = read_sp ();
> fp = read_fp ();
> pc = read_pc ();
> r0 = read_register (R0_REGNUM);
>
> (I'm assuming the prefetch* functions are added to regcache.c to do
> whatever housekeeping is required and call the target vector
> function).
To follow on from Stephane's comments. I have a feeling that this would
make things unnecessarily complicated.
Looking at the remote case and the ``T'' packet. There isn't any reason
why the ``T'' packet doesn't just return all of the registers. Across a
TCP connection that should have zero marginal cost.
The other thing to consider is given a request for reg N, the target
could satisfy it by fetching an entire block of registers M<=N<=O and
entering them all into the cache.
In away the ``G'' (registers) packet does this - you ask for one
register and get back a block. Unfortunatly the block is very very
large and fixed.
Andrew