Joe McDonnell created IMPALA-11110:
--------------------------------------
Summary: 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
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]