This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: additional vector function to improve register fetch performance


"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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]