IMPALA-3619: disable IR symbols by default

These come with significant memory overhead, meaning that the memory
usage of the debug build diverges significantly from the release build.

We should disable them by default. They can be enable by setting
ENABLE_IMPALA_IR_DEBUG_INFO=true.

Change-Id: Ia5426fe3f8be0b7a100c0c3683c8ef1eaf507146
Reviewed-on: http://gerrit.cloudera.org:8080/3223
Reviewed-by: Dan Hecht <[email protected]>
Tested-by: Internal Jenkins


Project: http://git-wip-us.apache.org/repos/asf/incubator-impala/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-impala/commit/48968959
Tree: http://git-wip-us.apache.org/repos/asf/incubator-impala/tree/48968959
Diff: http://git-wip-us.apache.org/repos/asf/incubator-impala/diff/48968959

Branch: refs/heads/master
Commit: 489689598857adf0065df4ad86e577b5b28fa66b
Parents: 77da383
Author: Tim Armstrong <[email protected]>
Authored: Wed May 25 17:14:19 2016 -0700
Committer: Tim Armstrong <[email protected]>
Committed: Tue May 31 23:32:11 2016 -0700

----------------------------------------------------------------------
 be/CMakeLists.txt    | 8 ++++----
 bin/impala-config.sh | 4 ++++
 2 files changed, 8 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/48968959/be/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/be/CMakeLists.txt b/be/CMakeLists.txt
index 1043b0a..630bae9 100644
--- a/be/CMakeLists.txt
+++ b/be/CMakeLists.txt
@@ -150,10 +150,10 @@ if (IMPALA_TOOLCHAIN)
   # -Werror: compile warnings should be errors when using the toolchain 
compiler.
   SET(CLANG_IR_CXX_FLAGS "${CLANG_IR_CXX_FLAGS}" "-Werror")
 endif()
-if ("${CMAKE_BUILD_TYPE}" STREQUAL "DEBUG")
-  # -g: emit debug symbols in IR. These increase IR size, but are useful for 
debugging
-  #     codegened code and interpreting codegen disassembly dumps. In some 
cases (e.g.
-  #     reading optimised disassembly, it would be useful to have in the 
release build.
+IF($ENV{ENABLE_IMPALA_IR_DEBUG_INFO} STREQUAL "true")
+  # -g: emit debug symbols in IR. These increase IR size and memory overhead 
of LLVM, but
+  #     are useful for debugging codegened code and interpreting codegen 
disassembly
+  #     dumps.
   SET(CLANG_IR_CXX_FLAGS "${CLANG_IR_CXX_FLAGS}" "-g")
 endif()
 

http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/48968959/bin/impala-config.sh
----------------------------------------------------------------------
diff --git a/bin/impala-config.sh b/bin/impala-config.sh
index 342be20..89b7400 100755
--- a/bin/impala-config.sh
+++ b/bin/impala-config.sh
@@ -53,11 +53,15 @@ fi
 # also set IMPALA_BUILD_THREADS to increase parallelism.
 : ${IMPALA_CXX_COMPILER=default}
 
+# If enabled, debug symbols are added to cross-compiled IR.
+: ${ENABLE_IMPALA_IR_DEBUG_INFO=false}
+
 export DISABLE_IMPALA_TOOLCHAIN
 export IMPALA_TOOLCHAIN
 export USE_SYSTEM_GCC
 export USE_GOLD_LINKER
 export IMPALA_CXX_COMPILER
+export ENABLE_IMPALA_IR_DEBUG_INFO
 export IS_OSX=$(if [[ "$OSTYPE" == "darwin"* ]]; then echo true; else echo 
false; fi)
 
 # To use a local build of Kudu, set KUDU_BUILD_DIR to the path Kudu was built 
in and

Reply via email to