You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@orc.apache.org by do...@apache.org on 2021/12/16 00:05:03 UTC

[orc] branch branch-1.7 updated: ORC-1021: Add -fno-omit-frame-pointer in DEBUG and RELWITHDEBINFO builds (#932)

This is an automated email from the ASF dual-hosted git repository.

dongjoon pushed a commit to branch branch-1.7
in repository https://gitbox.apache.org/repos/asf/orc.git


The following commit(s) were added to refs/heads/branch-1.7 by this push:
     new a0bb4ad  ORC-1021: Add -fno-omit-frame-pointer in DEBUG and RELWITHDEBINFO builds (#932)
a0bb4ad is described below

commit a0bb4adb4719e76b9528328300f14b8cd1940fbf
Author: Quanlong Huang <hu...@gmail.com>
AuthorDate: Sun Oct 10 03:05:34 2021 +0800

    ORC-1021: Add -fno-omit-frame-pointer in DEBUG and RELWITHDEBINFO builds (#932)
    
    ### What changes were proposed in this pull request?
    
    This PR adds -fno-omit-frame-pointer gcc option in DEBUG and RELWITHDEBINFO builds, which helps to generate stacktrace in debugging and profiling. Refs:
    https://www.brendangregg.com/perf.html#StackTraces
    https://issues.apache.org/jira/browse/IMPALA-4132
    
    ### Why are the changes needed?
    
    Described as above.
    
    ### How was this patch tested?
    
    Built in ubuntu16.04 with gcc 8.4.0.
    
    (cherry picked from commit 4b9c45ccc8b767311db9f51777b8a0c52a153535)
    Signed-off-by: Dongjoon Hyun <do...@apache.org>
---
 CMakeLists.txt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7903a44..6e3ec7f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -84,8 +84,8 @@ endif ()
 # Compiler specific flags
 #
 if (NOT MSVC)
-  set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g")
-  set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O3 -g -DNDEBUG")
+  set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g -fno-omit-frame-pointer")
+  set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O3 -g -DNDEBUG -fno-omit-frame-pointer")
   set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG")
 endif ()
 message(STATUS "compiler ${CMAKE_CXX_COMPILER_ID} version ${CMAKE_CXX_COMPILER_VERSION}")