Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Variables View / Registers View architecture.

Hi Bala,

There are two easy ways you can improve the GDB performance when doing remote debugging, see below:

* Tell GDB that read-only sections in the ELF file really are read-only. In that case, GDB can fetch values from these sections out of the ELF file, rather than from the target. Use the following GDB command in the Eclipse GDB console:
"set trust-readonly-sections on"

* Make GDB cache the debugged program's stack area using the following GDB command in the Eclipse GDB console:
"mem <lowaddr> <highaddr> rw cache"

I have suggested a further performance enhancement in PR 89809 "Suggestion for a more efficient stackframe updating", but there is no target date for that fix and I don't have any time to fix it myself right now.

/Stefan


Balasubramaniyan K wrote:

Hi,


Before I explain my understanding about the Architecture of Variables View or Registers View, let me try to explain my actual
problem

I am trying to do a remote debug operation from Eclipse / CDT. Though I am succesful, yet there is a considerable performance delay
in Variables & Registers View. After conducting few experiments, we have found out that performance delay is due to the network latency. In other words, Eclipse transmits a command & waits until GDB sends a response & vice versa. Due to this, GDB at the remote end is idle most of the time. For every request & response, the round trip
time is 203 milliseconds & for 70 variables in context,
the variables view takes 10 seconds to come up.  The solution which we could think of this, we could remove the wait state of the
transmitter ie., Tx keeps pumping commands to the GDB so that GDB is always in state of sending response. By this , we could remove
203 milliseconds for each command.  This is an idea. Is there any better solution ?

Now coming to my understanding,
For every variables for a context , there are three operations that are being carried viz., whatis, -var-create &
-var-evaluate-expression. Through the Stack-list-locals commands, all the local variables in the context are obtained & these are
dumped to the RegisterDescriptor[] or VariableDescriptor[] data structure as applicable. Then there is a ***Job**** that is getting
created which runs all the three commands on each & every variable. I have *starred*  at the code for a while now .Unfortunately, I
am  not able to find the piece that connects these ***Job*** & how they execute these three commands for every variable in the
context & who is starting these jobs.

	Any help would be greatly appreciated  ?


Warm Regards
Bala


_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev

begin:vcard
fn:Stefan Bylund
n:Bylund;Stefan
org:Enea Embedded Technology AB
adr;quoted-printable;quoted-printable:;;Nytorpsv=C3=A4gen 5B, Box 232;T=C3=A4by;;183 23;Sweden
email;internet:steby@xxxxxxx
title:Software Engineer
tel;work:+46 8 50714000
tel;cell:+46 709 714325
url:http://www.ose.com
version:2.1
end:vcard


Back to the top