From mboxrd@z Thu Jan 1 00:00:00 1970 From: Doug Goldstein Subject: Re: [PATCH 2/2] tools: detect appropriate debug optimization level Date: Wed, 30 Mar 2016 11:20:59 -0500 Message-ID: <56FBFCEB.2050301@cardoe.com> References: <1457403820-2949-1-git-send-email-cardoe@cardoe.com> <1457403820-2949-2-git-send-email-cardoe@cardoe.com> <20160308153847.GF31271@citrix.com> <56DEFF22.80004@cardoe.com> <22267.63547.372145.368852@mariner.uk.xensource.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============3492826700790453957==" Return-path: In-Reply-To: <22267.63547.372145.368852@mariner.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" To: Ian Jackson Cc: euan.harris@citrix.com, Stefano Stabellini , Wei Liu , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --===============3492826700790453957== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="fMj9TMCCD8ct0OHNjAWDHfcwsPlq906aN" This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --fMj9TMCCD8ct0OHNjAWDHfcwsPlq906aN Content-Type: multipart/mixed; boundary="D1w6t1q8Iwposcwf9oi1mXnulRf7GbE5a" From: Doug Goldstein To: Ian Jackson Cc: Wei Liu , xen-devel@lists.xen.org, Stefano Stabellini , euan.harris@citrix.com Message-ID: <56FBFCEB.2050301@cardoe.com> Subject: Re: [PATCH 2/2] tools: detect appropriate debug optimization level References: <1457403820-2949-1-git-send-email-cardoe@cardoe.com> <1457403820-2949-2-git-send-email-cardoe@cardoe.com> <20160308153847.GF31271@citrix.com> <56DEFF22.80004@cardoe.com> <22267.63547.372145.368852@mariner.uk.xensource.com> In-Reply-To: <22267.63547.372145.368852@mariner.uk.xensource.com> --D1w6t1q8Iwposcwf9oi1mXnulRf7GbE5a Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 3/30/16 11:00 AM, Ian Jackson wrote: > Doug Goldstein writes ("Re: [PATCH 2/2] tools: detect appropriate debug= optimization level"): >> On 3/8/16 9:38 AM, Wei Liu wrote: >>> On Mon, Mar 07, 2016 at 08:23:40PM -0600, Doug Goldstein wrote: >>>> The build should not use -O0 as that results in miscompilations. The= re >>> >>> This needs some (concrete) references. Is that a known issue in gcc? = If >>> so can you reference the bug number? >> >> So its not really a bug in GCC but just the complete lack of >> optimizations in play. inlines aren't inlined. dead code elimination >> isn't run so things are much bigger. structures aren't padded the same= way. >=20 > My initial reaction is that I any actual problems are bugs either in > the compiler or in Xen, which should be fixed. >=20 > There should be nothing wrong with lack of inlining or dead code > elimination. If you can give an example of structure padding going > wrong, please do. >=20 > Ian. >=20 Ok fine, I'm just confused why we're insisting on using -O0 over -Og? =46rom the gcc manual: -Og Optimize debugging experience. -Og enables optimizations that do not interfere with debugging. It should be the optimization level of choice for the standard edit-compile-debug cycle, offering a reasonable level of optimization while maintaining fast compilation and a good debugging experience. --=20 Doug Goldstein --D1w6t1q8Iwposcwf9oi1mXnulRf7GbE5a-- --fMj9TMCCD8ct0OHNjAWDHfcwsPlq906aN Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0 iQJ8BAEBCgBmBQJW+/zuXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRBNTM5MEQ2RTNFMTkyNzlCNzVDMzIwOTVB MkJDMDNEQzg3RUQxQkQ0AAoJEKK8A9yH7RvUnOAP/2i8nXQbRYwdgPmF8+uNyc+R gc/x4F4m4SxiLhW14Kadrtkw0quduBKRj1c3pfBtLSn/DBVcwv+n8HKx54z0Fb55 Tiit8JCVSILv+83FiAWS2nksoqCLBAiLgjMMBGBuTu3V95r/Kx05ieNtzsaeLSMX yE12igj3N+j3S3eB2JP+J2c8qyTMQPW5Bdhwl403T2S3cWuCf3OEN8oUKfIRDNPV D0omBU1nG1sofHSNKPluaP/mxq8cscXHY8u6IVvxsnCu/svoHZY64l8auxgVOYdo 9UKq68FFmqwmGxbZ/fMZLlAazROpqEjxhAt0JcoISLItZGluprDY+eXGh0P0zN8j XcRYmP/gFr1VigFM04CXtK1/XoM7VCEtvn9ikH5hf+mpA+a04cVfcr04xprpn+Et sh6/Ywtj9KpDsPAImljqMDGtxrv7E47RHQWFbKewMl7GCw569v80u9EmrDwl45OV dSnsqvLtIXFl2I77iP3uTkYA5FJ1r4em1xYvtwi2Yhl+uVMwW7HD++BIojq7BwT9 eTKiQ1pIHif8+IDDcEx6914g62r/syX3QQZf0b0ZRc2DXbfTy2ng3edkZsscC4dp V9Ss+DrMldPc1J58kw7a9oLmpojyxAScal3RrXMaYi4QivgDcQdqcq06KfDdUtnW hXgZCWquFjNlrj9AHwA2 =nxin -----END PGP SIGNATURE----- --fMj9TMCCD8ct0OHNjAWDHfcwsPlq906aN-- --===============3492826700790453957== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KWGVuLWRldmVs IG1haWxpbmcgbGlzdApYZW4tZGV2ZWxAbGlzdHMueGVuLm9yZwpodHRwOi8vbGlzdHMueGVuLm9y Zy94ZW4tZGV2ZWwK --===============3492826700790453957==--