Improve performance of large restore commands
authorAnton Blanchard <anton@samba.org>
Mon, 4 Nov 2013 10:39:20 +0000 (21:39 +1100)
committerAnton Blanchard <anton@samba.org>
Mon, 4 Nov 2013 11:18:23 +0000 (22:18 +1100)
commit67c059c29e1fb0cdeacdd2005f955514d8d1fb34
treea8a6ca67ff1b3f4e311447e82c2d650086aac93c
parent88b8e63904fda25c029deaf25d7b4e489b351470
Improve performance of large restore commands

I noticed a large (100MB) restore took hours to complete. The problem
is memory_xfer_partial repeatedly mallocs and memcpys the entire
100MB buffer for breakpoint shadow handling only to find a small
portion of it is actually written.

The testcase that originally took hours now takes 50 seconds.

gdb/
2013-07-29  Anton Blanchard  <anton@samba.org>

* target.c (memory_xfer_partial): Cap write to 4KB.
gdb/ChangeLog
gdb/target.c