Re: [PATCH 06/23] sim/erc32: Fix incorrect simulator performance report

Mike Frysinger
2015-02-17T09:07:46Z

[-- Attachment #1: Type: text/plain, Size: 1008 bytes --]

On 17 Feb 2015 08:44, Jiri Gaisler wrote:
> --- a/sim/erc32/func.c
> +++ b/sim/erc32/func.c
>
> - if (sregs->tottime == 0) tottime = 1; else tottime = sregs->tottime;
> + if (sregs->tottime == 0.0) sregs->tottime +=1E-6;

should uncuddle the statement

needs a space after the "+=" operator

> + printf(" Simulated ERC32 time : %.2f s\n", (float) (ebase.simtime - sregs->simstart) / 1000000.0 / sregs->freq);
> + printf(" Processor utilisation : %.2f %%\n", 100.0 * (1.0 - ((float) sregs->pwdtime / (float) stime)));
> + printf(" Real-time performance : %.2f %%\n", 100.0/
> + ((sregs->tottime) / ((double) (stime) / (sregs->freq * 1.0E6))));
> + printf(" Simulator performance : %.2f MIPS\n",(double)(sregs->ninst)/sregs->tottime/1E6);
> + printf(" Used time (sys + user) : %.2f s\n\n", sregs->tottime);

please line wrap these longer ones, and put spaces in the right places: after
commas, around math operators, etc...
-mike

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]