From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8512 invoked by alias); 17 Feb 2015 09:07:46 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 8500 invoked by uid 89); 17 Feb 2015 09:07:44 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: smtp.gentoo.org Received: from smtp.gentoo.org (HELO smtp.gentoo.org) (140.211.166.183) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Tue, 17 Feb 2015 09:07:44 +0000 Received: from vapier (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with SMTP id AF5EB340809; Tue, 17 Feb 2015 09:07:41 +0000 (UTC) Date: Tue, 17 Feb 2015 09:07:00 -0000 From: Mike Frysinger To: Jiri Gaisler Cc: gdb-patches@sourceware.org Subject: Re: [PATCH 06/23] sim/erc32: Fix incorrect simulator performance report Message-ID: <20150217090741.GK20008@vapier> Mail-Followup-To: Jiri Gaisler , gdb-patches@sourceware.org References: <1424159099-5148-1-git-send-email-jiri@gaisler.se> <1424159099-5148-7-git-send-email-jiri@gaisler.se> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="/rDaUNvWv5XYRSKj" Content-Disposition: inline In-Reply-To: <1424159099-5148-7-git-send-email-jiri@gaisler.se> X-IsSubscribed: yes X-SW-Source: 2015-02/txt/msg00412.txt.bz2 --/rDaUNvWv5XYRSKj Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-length: 1019 On 17 Feb 2015 08:44, Jiri Gaisler wrote: > --- a/sim/erc32/func.c > +++ b/sim/erc32/func.c >=20=20 > - if (sregs->tottime =3D=3D 0) tottime =3D 1; else tottime =3D sregs->= tottime; > + if (sregs->tottime =3D=3D 0.0) sregs->tottime +=3D1E-6; should uncuddle the statement needs a space after the "+=3D" operator > + printf(" Simulated ERC32 time : %.2f s\n", (float) (ebase.sim= time - 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: aft= er=20 commas, around math operators, etc... -mike --/rDaUNvWv5XYRSKj Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-length: 819 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBAgAGBQJU4wTdAAoJEEFjO5/oN/WBZTEP/2k4Ym7xcr2vr4E3ZOJH/4uY dH4nwHjitCzeffB4iB08RveGNi+rpnvCYu+obclBAWgUSSjFqxv3IoiBYnAZBBTi FCfeDdviLtwz+pVyplh67VB/wGiZWZCp/HCUdbXNUbtsoDllisRtQ3+zvxZnCnsF Ah4E9AOXUDNb4ctnSBFHxjxGyWw/QGgeSewLPUMAaBNhiRi2SyI3BVCByxgpVrQQ J6jgNfFF0CxGAqhB/rAAL6eTpi/Uax6kKyNwdZgFng2T9ficooIek88me2dDFdvR Y1hVMjgmgo4GelwmdDipnEj2yp8DEMI3GrtJL1y6ZHjibZ9E3bEKqIBZ1gC2TJbS sS1NipN83qhb0AmBFG1zSaEMjYPBUb8ylnYYoLQVm/ip46ekZ5gcPRtbpybBJID0 xrjP7VtKCXNj9asCOeeqs/qssDPJrHy55fPI2ODV3ihSdQCm48rJLR8R2Ag+fxvC DVdKxHKIdcfhtMsigXOwtUX7ZtnvXyFPf1HYBDe6ALKYJbkdgVMdQL92bMlF4/aj 4M4puf/9DXK5xJEXklQIVLx9trdmEUjuiNqJaZ9BQuPyLBgoVZQGSNVdGce0jXvm nQochymrzXp7WTGA1aztlB0QPNbovAMjVYhCxRfXYbm7S1s6KE4mvXse/n3RY7gg WS8OQR0NJeVMjPOlR/Py =f6jR -----END PGP SIGNATURE----- --/rDaUNvWv5XYRSKj--