[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 2/2] tools: detect appropriate debug optimization level

On Wed, Mar 30, 2016 at 5:00 PM, Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx> 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. There
>> >
>> > 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.
> My initial reaction is that I any actual problems are bugs either in
> the compiler or in Xen, which should be fixed.
> 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.

I know in the Linux kernel the level of optimization must be -O2,
because there are certain things that rely on dead code elimination to
function properly.  I'm not sure if the Xen hypervisor has similar
requirements, but I'd be rather surprised if it didn't.

It would be nice to know what functionality in the tools relied on
inlining and/or dead code elimination (and under what circumstances),
but we probably have better things to do than make -O0 to work. :-)


Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.