This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: "Transfer rate" patch


Ilko Iliev wrote:

[snip quoted entire previous patch]

>   --- 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 <iliev@ronetix.at>
> +
> +ÂÂÂÂÂÂÂ* symfile.c (print_transfer_performance): Fix overflow problem
> + Â Â Â Âand change bits/sec to KBytes/sec or bytes/sec
> +
> 2006-08-28 ÂDJ Delorie Â<dj@redhat.com>
> 
> * 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 15:19:45.000000000 +0200
> @@ -1769,14 +1769,23 @@
> 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");
> + Â Â Âif ( data_count < 1024 )
> + Â Â Â Â{
> + Â Â Â Â Âui_out_field_fmt (uiout, "transfer-rate", "%lu",
> + Â Â Â Â Â Â(unsigned long)((((unsigned long long)data_count) * 1000) /
> time_count)); 

I think the above line is longer than 80 characters, and that's probably not
OK.

Also, I think this branch should be taken if download speed is smaller that
1024 bytes *per second*, not when total download size is less than 1024
bytes.

- Volodya



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]