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

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


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

commit 4b9c45ccc8b767311db9f51777b8a0c52a153535
Author: Quanlong Huang <[email protected]>
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.
---
 CMakeLists.txt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index e75b827..a07153c 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}")

Reply via email to