From: Raphael Zulliger <zulliger@indel.ch>
To: Tom Tromey <tromey@redhat.com>
Cc: gdb@sourceware.org
Subject: Re: Unneeded displaced single stepping causes issues: Performance drop and range stepping killer
Date: Wed, 24 Apr 2013 06:58:00 -0000 [thread overview]
Message-ID: <517782A0.4060609@indel.ch> (raw)
In-Reply-To: <87li88o7fd.fsf@fleche.redhat.com>
On 04/24/2013 06:53 AM, Tom Tromey wrote:
>>>>>> "Raphael" == Raphael Zulliger <zulliger@indel.ch> writes:
> Raphael> versus:
>
> Raphael> (gdb) set displaced-stepping 1
> Raphael> (gdb) si
> Raphael> Sending packet: $m1508,4#9b...Packet received: 3c000058
> Raphael> Sending packet: $m832d4,4#02...Packet received: 7c0802a6
> Raphael> Sending packet: $X1508,0:#bc...Packet received:
> Raphael> binary downloading NOT supported by target
> Raphael> Sending packet: $M1508,4:7c0802a6#b0...Packet received: OK
> Raphael> Sending packet: $g#67...Packet received:
> [...]
>
> I guess this is copying the instruction and stepping it?
Yes.
> I wonder if we
> could put more information about displaced stepping into the remote
> protocol, to avoid the extra traffic.
Good point! Something like:
vCont;d:p1.dca118
Would perfectly work for our system. (For our system it'd be required
that GDB does the displaced step fixup, as we do not (yet) support this
on the target side - others systems may even avoid that step).
Speaking in RSP, it could then look like this:
(gdb) si
Sending packet: $vCont;d:p1.dca118#83...Packet received: OK
Notification received:
Stop:T05thread:p1.dca118;0:00049cd0;1:00dcde40;2:00dca118;3:00dcdea4;4:00dcdea0;5:00000142;6:00dcde68;7:00000002;8:00000005;9:00dcdea4;a:00579e90;b:00ed4b34;c:00000000;d:f7ffffff;e:00000357;f:f1010000;10:00000000;11:fff71658;12:0068e738;13:001dd964;14:00000000;15:00000000;16:0069c120;17:00000000;18:00000037;19:00000000;1a:00000032;1b:00e6b2c0;1c:00087e48;1d:00ed12a0;1e:00ed1b68;1f:00dcde78;20:00000006347fd013;21:3ff199999999999a;22:3ff199999999999a;23:0000000000000000;24:0000000000000000;25:0000000000000000;26:0000000000000000;27:0000000000000000;28:0000000000000000;29:0000000000000000;2a:0000000000000000;2b:0000000000000000;2c:401900a3d70a3d71;2d:3ff199999999999a;2e:0000000000000000;2f:0000000000000000;30:0000000000000000;31:0000000000000000;32:0000000000000000;33:0000000000000000;34:0000000000000000;35:0000000000000000;36:0000000000000000;37:0000000000000000;38:0000000000000000;39:0000000000000000;3a:0000000000000000;3b:0000000000000000;3c:0000000000000000;3d:0000000000000000;3e:0000000000000000;3f:0000000000000000;46:efbeadde;40:0000150c;41:0008a030;42:20000004;43:00049cd0;44:00000000;45:00000000;
Sending packet: $vStopped#55...Packet received: OK
Sending packet: $P40=000832d8#ba...Packet received: OK
vs:
(gdb) si
Sending packet: $m1508,4#9b...Packet received: 3c000058
Sending packet: $m832d4,4#02...Packet received: 7c0802a6
Sending packet: $M1508,4:7c0802a6#b0...Packet received: OK
Sending packet: $g#67...Packet received:
00dcdea000dcde4000dca11800dcdea400dcdea00000014200dcde68000000020000000500dcdea400579e9000ed4b3400000000f7ffffff00000357f101000000000000fff716580068e738001dd96400000000000000000069c1200000000000000037000000000000003200e6b2c000087e4800ed12a000ed1b6800dcde7800000006347fd0133ff199999999999a3ff199999999999a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000401900a3d70a3d713ff199999999999a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000832d40008a0302000000400049cd00000000000000000efbeadde
Sending packet: $P40=00001508#7f...Packet received: OK
Sending packet: $vCont;s:p1.dca118#83...Packet received: OK
Notification received:
Stop:T05thread:p1.dca118;0:00049cd0;1:00dcde40;2:00dca118;3:00dcdea4;4:00dcdea0;5:00000142;6:00dcde68;7:00000002;8:00000005;9:00dcdea4;a:00579e90;b:00ed4b34;c:00000000;d:f7ffffff;e:00000357;f:f1010000;10:00000000;11:fff71658;12:0068e738;13:001dd964;14:00000000;15:00000000;16:0069c120;17:00000000;18:00000037;19:00000000;1a:00000032;1b:00e6b2c0;1c:00087e48;1d:00ed12a0;1e:00ed1b68;1f:00dcde78;20:00000006347fd013;21:3ff199999999999a;22:3ff199999999999a;23:0000000000000000;24:0000000000000000;25:0000000000000000;26:0000000000000000;27:0000000000000000;28:0000000000000000;29:0000000000000000;2a:0000000000000000;2b:0000000000000000;2c:401900a3d70a3d71;2d:3ff199999999999a;2e:0000000000000000;2f:0000000000000000;30:0000000000000000;31:0000000000000000;32:0000000000000000;33:0000000000000000;34:0000000000000000;35:0000000000000000;36:0000000000000000;37:0000000000000000;38:0000000000000000;39:0000000000000000;3a:0000000000000000;3b:0000000000000000;3c:0000000000000000;3d:0000000000000000;3e:0000000000000000;3f:0000000000000000;46:efbeadde;40:0000150c;41:0008a030;42:20000004;43:00049cd0;44:00000000;45:00000000;
Sending packet: $vStopped#55...Packet received: OK
Sending packet: $M1508,4:3c000058#78...Packet received: OK
Sending packet: $P40=000832d8#ba...Packet received: OK
That would be quite an improvement!
While we are at it... I've got another note related to single-stepping:
For our system, once a 'vCont;s:' returns with "OK", the single-step has
already been performed. Maybe this is also the case for the majority of
the systems out there? For systems like ours, we could get rid of the
stop notification, by returning the content of the stop reply (sig
number & registers) right in the vCont reply. (And, of course, the same
would be true for range stepping.) That would again reduce the
communication to something like:
(gdb) si
Sending packet: $vCont;d:p1.dca118#83...Packet received:
T05thread:p1.dca118;0:00049cd0;1:00dcde40;2:00dca118;3:00dcdea4;4:00dcdea0;5:00000142;6:00dcde68;7:00000002;8:00000005;9:00dcdea4;a:00579e90;b:00ed4b34;c:00000000;d:f7ffffff;e:00000357;f:f1010000;10:00000000;11:fff71658;12:0068e738;13:001dd964;14:00000000;15:00000000;16:0069c120;17:00000000;18:00000037;19:00000000;1a:00000032;1b:00e6b2c0;1c:00087e48;1d:00ed12a0;1e:00ed1b68;1f:00dcde78;20:00000006347fd013;21:3ff199999999999a;22:3ff199999999999a;23:0000000000000000;24:0000000000000000;25:0000000000000000;26:0000000000000000;27:0000000000000000;28:0000000000000000;29:0000000000000000;2a:0000000000000000;2b:0000000000000000;2c:401900a3d70a3d71;2d:3ff199999999999a;2e:0000000000000000;2f:0000000000000000;30:0000000000000000;31:0000000000000000;32:0000000000000000;33:0000000000000000;34:0000000000000000;35:0000000000000000;36:0000000000000000;37:0000000000000000;38:0000000000000000;39:0000000000000000;3a:0000000000000000;3b:0000000000000000;3c:0000000000000000;3d:0000000000000000;3e:0000000000000000;3f:0000000000000000;46:efbeadde;40:0000150c;41:0008a030;42:20000004;43:00049cd0;44:00000000;45:00000000;
Sending packet: $P40=000832d8#ba...Packet received: OK
>
> Tom
>
prev parent reply other threads:[~2013-04-24 6:58 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-22 10:54 Raphael Zulliger
2013-04-23 19:03 ` Pedro Alves
2013-04-24 6:58 ` Raphael Zulliger
2013-04-24 2:24 ` Yao Qi
2013-04-24 6:58 ` Raphael Zulliger
2013-05-01 3:36 ` Doug Evans
2013-05-03 2:32 ` Yao Qi
2013-04-24 4:54 ` Tom Tromey
2013-04-24 6:58 ` Raphael Zulliger [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=517782A0.4060609@indel.ch \
--to=zulliger@indel.ch \
--cc=gdb@sourceware.org \
--cc=tromey@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox