From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from jupiter.monnerat.net (jupiter.monnerat.net [46.226.111.226]) by sourceware.org (Postfix) with ESMTPS id 11A8B385840A for ; Mon, 14 Feb 2022 00:56:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 11A8B385840A Received: from [192.168.0.128] ([192.168.0.128]) by jupiter.monnerat.net (8.14.8/8.14.8) with ESMTP id 21E0ucVx021641 (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256 verify=OK); Mon, 14 Feb 2022 01:56:43 +0100 DKIM-Filter: OpenDKIM Filter v2.10.3 jupiter.monnerat.net 21E0ucVx021641 Message-ID: Date: Mon, 14 Feb 2022 01:56:38 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Subject: Re: [PATCH v3] gdb: Improve debuginfod progress updates Content-Language: en-US To: Aaron Merey , gdb-patches@sourceware.org Cc: tom@tromey.com References: <20220126005817.56356-1-amerey@redhat.com> <20220209022548.343785-1-amerey@redhat.com> From: Patrick Monnerat In-Reply-To: <20220209022548.343785-1-amerey@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, JMQ_SPF_NEUTRAL, NICE_REPLY_A, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Feb 2022 00:56:51 -0000 Hi Aaron, I finally found time to check your patch with Insight and it seems to work. Please find some questions/remarks embedded in your code. > + /* Transfer size is known. */ > + double percent = (double)cur / (double)total; The variable name is confusing as it is <= 1.0. > + > + if (percent >= 0.0 && percent <= 1.0) I don't think this test is needed: cur and total are obtained (indirectly) from curl and IMHO you can trust it. > + progress_update object. */ > + void update_progress_bar (double howmuch) This is never called! why do you provide both PERCENT and (unused) BAR? This is a bit confusing. Thanks for your work on it. Patrick