From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26174 invoked by alias); 17 Oct 2006 16:04:57 -0000 Received: (qmail 26164 invoked by uid 22791); 17 Oct 2006 16:04:56 -0000 X-Spam-Check-By: sourceware.org Received: from fra-del-03.spheriq.net (HELO fra-del-03.spheriq.net) (195.46.51.99) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 17 Oct 2006 16:04:48 +0000 Received: from fra-out-02.spheriq.net (fra-out-02.spheriq.net [195.46.51.130]) by fra-del-03.spheriq.net with ESMTP id k9HG4jl6025388 for ; Tue, 17 Oct 2006 16:04:45 GMT Received: from fra-cus-02.spheriq.net (fra-cus-02.spheriq.net [195.46.51.38]) by fra-out-02.spheriq.net with ESMTP id k9HG4ixg016858 for ; Tue, 17 Oct 2006 16:04:44 GMT Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by fra-cus-02.spheriq.net with ESMTP id k9HG4g7D002163 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK) for ; Tue, 17 Oct 2006 16:04:43 GMT Received: from zeta.dmz-eu.st.com (ns2.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 6212CDA41 for ; Tue, 17 Oct 2006 16:04:42 +0000 (GMT) Received: from mail1.bri.st.com (mail1.bri.st.com [164.129.8.218]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id DCC60474C9 for ; Tue, 17 Oct 2006 16:04:40 +0000 (GMT) Received: from [164.129.15.13] (bri1043.bri.st.com [164.129.15.13]) by mail1.bri.st.com (MOS 3.5.8-GR) with ESMTP id CIC69618 (AUTH stubbsa); Tue, 17 Oct 2006 17:04:38 +0100 (BST) Message-ID: <4534FF16.1030900@st.com> Date: Tue, 17 Oct 2006 16:04:00 -0000 From: Andrew STUBBS User-Agent: Thunderbird 1.5.0.7 (Windows/20060909) MIME-Version: 1.0 To: gdb-patches@sources.redhat.com Subject: Re: "Transfer rate" patch References: <44FD2640.7080605@ronetix.at> <45002AB3.7090402@ronetix.at> <200609071954.k87Js9sd022237@elgar.sibelius.xs4all.nl> <45045E5E.6020602@ronetix.at> In-Reply-To: <45045E5E.6020602@ronetix.at> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-10/txt/msg00184.txt.bz2 What happened to this patch? This is one I would like to see. Ilko Iliev wrote: > Mark Kettenis wrote: >>> Date: Thu, 07 Sep 2006 16:20:35 +0200 >>> From: Ilko Iliev >>> >>> The corrected patch again - the output is in "KBytes/sec" or >>> "bytes/sec". >>> The ChangeLog file is updated too. >>> >>> I changed to "KBytes/sec" because of our and other fast JTAG Emulators. >>> >> >> Well 9600 Bps is still pretty much standard for serial lines. >> >> Mark >> > > Even of 9600 Bps it is more comfortable to see the download sped in > KBytes/s. > If the download speed is less than 1 KByte/s, the print is in bytes/s. > > In the attachment is the corrected version of the patch. > > > regards, > Ilko Iliev > Ronetix - JTAG Emulators and Flash Programmers > www.ronetix.at > > > > ------------------------------------------------------------------------ > > --- ChangeLog.orig 2006-09-07 15:23:19.000000000 +0200 > +++ ChangeLog 2006-09-07 15:27:46.000000000 +0200 > @@ -1,3 +1,8 @@ > +2006-09-07 Ilko Iliev > + > + * symfile.c (print_transfer_performance): Fix overflow problem > + and change bits/sec to KBytes/sec or bytes/sec > + > 2006-08-28 DJ Delorie > > * m32c-tdep.c (m32c_decode_srcdest4): Initialize fields in sd > > > > --- symfile.c.orig 2006-08-31 15:29:12.000000000 +0200 > +++ symfile.c 2006-09-07 17:23:48.000000000 +0200 > @@ -1758,27 +1758,36 @@ print_transfer_performance (struct ui_fi > unsigned long write_count, > const struct timeval *start_time, > const struct timeval *end_time) > { > unsigned long time_count; > + unsigned long rr; > > /* Compute the elapsed time in milliseconds, as a tradeoff between > accuracy and overflow. */ > time_count = (end_time->tv_sec - start_time->tv_sec) * 1000; > time_count += (end_time->tv_usec - start_time->tv_usec) / 1000; > > ui_out_text (uiout, "Transfer rate: "); > if (time_count > 0) > { > - ui_out_field_fmt (uiout, "transfer-rate", "%lu", > - 1000 * (data_count * 8) / time_count); > - ui_out_text (uiout, " bits/sec"); > + rr = (unsigned long)((unsigned long long)data_count * 1000 / time_count); > + if ( rr < 1024 ) > + { > + ui_out_field_fmt (uiout, "transfer-rate", "%lu", rr ); > + ui_out_text (uiout, " bytes/sec"); > + } > + else > + { > + ui_out_field_fmt (uiout, "transfer-rate", "%lu", rr / 1024 ); > + ui_out_text (uiout, " Kbytes/sec"); > + } > } > else > { > - ui_out_field_fmt (uiout, "transferred-bits", "%lu", (data_count * 8)); > - ui_out_text (uiout, " bits in <1 sec"); > + ui_out_field_fmt (uiout, "transferred-bytes", "%lu", data_count); > + ui_out_text (uiout, " bytes in <1 sec"); > } > if (write_count > 0) > { > ui_out_text (uiout, ", "); > ui_out_field_fmt (uiout, "write-rate", "%lu", data_count / write_count); >