From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 39882 invoked by alias); 17 Aug 2015 16:00:07 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 39868 invoked by uid 89); 17 Aug 2015 16:00:07 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=no version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Mon, 17 Aug 2015 16:00:06 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (Postfix) with ESMTPS id C659A341AD4; Mon, 17 Aug 2015 16:00:04 +0000 (UTC) Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t7HG02pr026582; Mon, 17 Aug 2015 12:00:03 -0400 Message-ID: <55D20502.4070500@redhat.com> Date: Mon, 17 Aug 2015 16:00:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Sandra Loosemore , Gary Benson CC: gdb-patches@sourceware.org, Doug Evans Subject: Re: [PATCH] Make remote transfers interruptible References: <55C3A10F.3010106@codesourcery.com> <1439389814-29211-1-git-send-email-gbenson@redhat.com> <55CB8300.3060004@codesourcery.com> In-Reply-To: <55CB8300.3060004@codesourcery.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SW-Source: 2015-08/txt/msg00427.txt.bz2 On 08/12/2015 06:31 PM, Sandra Loosemore wrote: > On 08/12/2015 08:30 AM, Gary Benson wrote: >> Hi Sandra, >> >> Sandra Loosemore wrote: >>> On 08/05/2015 09:28 AM, Gary Benson wrote: >>>> This commit makes it possible to interrupt slow remote file transfers. >>>> >>>> gdb/ChangeLog: >>>> >>>> * gdb_bfd.c (gdb_bfd_iovec_fileio_pread): Add QUIT call. >>> >>> It still does not work for me. :-( >> >> Could you please try this newer version and see if it allows you to >> interrupt the remote transfers? > > This version still doesn't make the transfer interruptable with ^C. > *But*, with this patch, the startup time is reduced from 4 minutes to 19 > seconds. Huh? Is it really transferring the entire file contents, or > was the time being used for some GDB-side operation that is quadratic or > exponential in the size of the read requested rather than the actual > byte transfer? Independently of the ^C issue, I think we need to better > understand what is going on here and better tune the code on both sides > of the RSP for large file transfers. Even if a user asks for > target-side libraries explicitly, 4 minutes to transfer one library > doesn't provide a good user experience, and 19 seconds isn't so great > either when you consider that some interactive applications link with > dozens of GUI or multimedia libraries and not just glibc. > Now that's quite surprising. It seems to make no difference to me. Granted, I'm testing on the local machine, but, attaching to Firefox, with: $ ./gdbserver/gdbserver --multi :9999 and then: $ ./gdb -data-directory=data-directory -ex "tar extended-rem :9999" -ex "set pagination off" -ex "attach 31613" -ex "info shared" -ex "set confirm off" -ex "detach" -ex "quit" takes around 3-5 seconds with or without patch. Around one second less if I do (add "set sysroot /"): $ ./gdb -data-directory=data-directory -ex "set sysroot /" -ex "tar extended-rem :9999" -ex "set pagination off" -ex "attach 31613" -ex "info shared" -ex "set confirm off" -ex "detach" -ex "quit" I was previously assuming you were seeing this on multiple machines, but looking back, I only find mention of nios2. Could it be the slowdown you see is caused by some other local patches you might have in the tree you're using? Do you see it with pristine FSF? If you try your example test with gdb 7.9, with "set sysroot remote:", does it also take the 4 minutes to reach main? Also, can you reproduce this with other machines? E.g., what about x86_64 GNU/Linux? Wondering whether it's a kernel/libc/etc issue... Does anyone else confirm the unexpected slowness Sandra is seeing? Thanks, Pedro Alves