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] |
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:
signature.asc
Description: Digital signature
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |