[ 
https://issues.apache.org/jira/browse/IMPALA-11110?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17509985#comment-17509985
 ] 

ASF subversion and git services commented on IMPALA-11110:
----------------------------------------------------------

Commit a5a9b1e3f9310f42785fb2d0459b80571e9fbb80 in impala's branch 
refs/heads/master from Joe McDonnell
[ https://gitbox.apache.org/repos/asf?p=impala.git;h=a5a9b1e ]

IMPALA-11110: Switch debug builds to use -Og

GCC's -Og applies optimizations that are compatible with
being debuggable. It is similar to -O1 and results
in a modest speed-up. This modifies the default debug
build to use -Og, so it is now more akin to a fastdebug
mode.

Even though -Og is intended to preserve debuggability,
optimization always impacts debuggability and -Og is
no exception. To enable the old behavior, this adds
a DEBUG_NOOPT build mode that retains the old
non-optimized behavior. Using the -debug_noopt flag
with buildall.sh enables this behavior.

Change-Id: Ie06c149c8181c90572b8668bd01dfd26c0a5971e
Reviewed-on: http://gerrit.cloudera.org:8080/18200
Tested-by: Impala Public Jenkins <[email protected]>
Reviewed-by: Laszlo Gaal (Cloudera) <[email protected]>
Reviewed-by: Csaba Ringhofer <[email protected]>


> Enable basic optimizations for debug builds
> -------------------------------------------
>
>                 Key: IMPALA-11110
>                 URL: https://issues.apache.org/jira/browse/IMPALA-11110
>             Project: IMPALA
>          Issue Type: Improvement
>          Components: Infrastructure
>    Affects Versions: Impala 4.1.0
>            Reporter: Joe McDonnell
>            Assignee: Joe McDonnell
>            Priority: Major
>
> Currently, Impala debug builds use no optimizations. Some optimizations can 
> interfere with debuggability, and the debug builds prioritize debuggability. 
> However, running without optimizations means the binary is much slower.
> GCC has a debug-friendly optimization level -Og, which enables optimizations 
> that do not interfere with debugging. This may provide a way to get the 
> debuggability needed while having faster runtimes. See 
> [https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html]
> In testing this, the binaries are definitely faster. Core test runtimes are 
> reduced by about 25 minutes. Exhaustive test runtimes are reduced by over an 
> hour.
> The extra optimization enables compiler passes that produce more debugging 
> information. This means that the binaries have more debug info, which make 
> them larger. This extra information is likely related to variable tracking 
> (i.e. fvar-tracking-assignments), which is recommended for maximum 
> debuggability (but may not be strictly necessary for how we use it). See 
> [https://gcc.gnu.org/onlinedocs/gcc/Debugging-Options.html]
> {noformat}
> Binary size for impalad (unstripped)
> Without -Og: 519345880
> With -Og: 709527368
> Binary size for impalad (stripped)
> Without -Og: 164500024
> With -Og: 105873184{noformat}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to