[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 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. 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.
> 
> Ian.
> 

Ok fine, I'm just confused why we're insisting on using -O0 over -Og?

From 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.

-- 
Doug Goldstein

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

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