This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Improve performance of large restore commands
- From: Pedro Alves <palves at redhat dot com>
- To: Anton Blanchard <anton at samba dot org>
- Cc: Luis Machado <lgustavo at codesourcery dot com>, gdb-patches at sourceware dot org
- Date: Mon, 29 Jul 2013 15:13:47 +0100
- Subject: Re: [PATCH] Improve performance of large restore commands
- References: <20130725220858 dot 58184193 at kryten> <51F16780 dot 70408 at redhat dot com> <20130729154457 dot 0e6e6bd7 at kryten>
On 07/29/2013 06:44 AM, Anton Blanchard wrote:
> 2013-07-29 Anton Blanchard <anton@samba.org>
>
> * target.c (memory_xfer_partial): Cap write to 4K
Period at end of sentence. Might as well write KB :-).
>
> Index: b/gdb/target.c
> ===================================================================
> --- a/gdb/target.c
> +++ b/gdb/target.c
> @@ -1669,6 +1669,13 @@ memory_xfer_partial (struct target_ops *
> void *buf;
> struct cleanup *old_chain;
>
> + /* A large write request is likely to be partially satisfied
> + by memory_xfer_partial_1. We will continually malloc
> + and free a copy of the entire write request for breakpoint
> + shadow handling even though we only end up writing a small
> + subset of it. Cap writes to 4K to mitigate this. */
Double space after all periods, not just the last.
> + len = min(4096, len);
Space before parens:
len = min (4096, len);
Otherwise OK.
Thanks,
--
Pedro Alves