From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37288) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zzhzy-0000j0-6u for qemu-devel@nongnu.org; Fri, 20 Nov 2015 04:28:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zzhzw-0002dZ-Vj for qemu-devel@nongnu.org; Fri, 20 Nov 2015 04:28:54 -0500 Date: Fri, 20 Nov 2015 18:53:20 +1100 From: David Gibson Message-ID: <20151120075320.GE7118@voom.redhat.com> References: <1447201710-10229-1-git-send-email-benh@kernel.crashing.org> <1447201710-10229-25-git-send-email-benh@kernel.crashing.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="phCU5ROyZO6kBE05" Content-Disposition: inline In-Reply-To: <1447201710-10229-25-git-send-email-benh@kernel.crashing.org> Subject: Re: [Qemu-devel] [Qemu-ppc] [PATCH 24/77] ppc: Move exception generation code out of line List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Benjamin Herrenschmidt Cc: qemu-ppc@nongnu.org, qemu-devel@nongnu.org --phCU5ROyZO6kBE05 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Nov 11, 2015 at 11:27:37AM +1100, Benjamin Herrenschmidt wrote: > There's no point inlining this, if you hit the exception case you exit > anyway, That doesn't quite seem relevant - IIUC this is affecting inlining in the code generation path, rather than the code execution path. > and not inlining saves about 100K of code size (and cache > footprint). That sounds like a win, though. >=20 > Signed-off-by: Benjamin Herrenschmidt > --- > target-ppc/translate.c | 9 ++++++--- > 1 file changed, 6 insertions(+), 3 deletions(-) >=20 > diff --git a/target-ppc/translate.c b/target-ppc/translate.c > index a5ab2eb..ac62942 100644 > --- a/target-ppc/translate.c > +++ b/target-ppc/translate.c > @@ -279,7 +279,8 @@ void gen_update_current_nip(void *opaque) > tcg_gen_movi_tl(cpu_nip, ctx->nip); > } > =20 > -static inline void gen_exception_err(DisasContext *ctx, uint32_t excp, u= int32_t error) > +static void __attribute__((noinline)) > +gen_exception_err(DisasContext *ctx, uint32_t excp, uint32_t error) I thought we generally avoided bare gcc attributes in qemu, but I don't see a helper macro for it and I do see it used in a few other places, so I guess its ok. > { > TCGv_i32 t0, t1; > if (ctx->exception =3D=3D POWERPC_EXCP_NONE) { > @@ -293,7 +294,8 @@ static inline void gen_exception_err(DisasContext *ct= x, uint32_t excp, uint32_t > ctx->exception =3D (excp); > } > =20 > -static inline void gen_exception(DisasContext *ctx, uint32_t excp) > +static void __attribute__((noinline)) > +gen_exception(DisasContext *ctx, uint32_t excp) > { > TCGv_i32 t0; > if (ctx->exception =3D=3D POWERPC_EXCP_NONE) { > @@ -305,7 +307,8 @@ static inline void gen_exception(DisasContext *ctx, u= int32_t excp) > ctx->exception =3D (excp); > } > =20 > -static inline void gen_debug_exception(DisasContext *ctx) > +static void __attribute__((noinline)) > +gen_debug_exception(DisasContext *ctx) > { > TCGv_i32 t0; > =20 --=20 David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson --phCU5ROyZO6kBE05 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJWTtFvAAoJEGw4ysog2bOSo4EP+wZCKjbFy4FSsx1JOrF1hS+y hdlCVZWhBKuZQLIhzJqja38GWgzyB7N9ML0iCiWxTv6VaoA6Fzc3I4ZCDcdUGdeN cfgjzlsX2cKZb5PaxFzbEWACtAuCJf1YwphcIa9pbZ+UqFnlfUQ8tOVQ2nHOPC7a CxV1b4NDRJnHTD1M2zepk54IjmZqDe+IZvKhviXriiqAFwtPSjLpw+bOVKu22HOv 9Ke9J2tr9OOuxW4GTRjUJQh6UDbogfK7xHF0uK3jrMd/BFUKGKTUpxcd1im0Sz1q 9UTp1uvnfcA9m/CN9E5BtF0SWZJKhBL0JMXwze8nShNPt1clhX/9h2rEAWuBo2Nw MSmjAsoyn0rRZI1B7S/R3jgrtHAQASooNQmb/IMeVVxU8G48iLhmv5L8R22GAlpP qx8GCwCWm9PFR1pDXB/ItKeJlTTbF2JKhtpUpivWGHvS3d9jTGuoDGtB42p5aol2 R7Jg/wrUAi8projdZNsmE3IG6bDa/WxV1z3aMh1IB8GEywo1JneYgJ7yhgNKL31P L4YFj3W9r9AhpkvvgdNe8dQTKKkFmf5xPaPkHacRAcdrBBQsejfaQyhqTGYpFzrY vu33G1srSR06Af64wGPWUUtXUu0C5r7fNVGnkXLKHatEr3MPeLld5+OkQzdn4ktc bJgSDE1r5jNYXaz+pxkU =+PrF -----END PGP SIGNATURE----- --phCU5ROyZO6kBE05--