Commit 793d7d6b authored by Daniel Agar's avatar Daniel Agar

cmake add gperftools support

-enabled with cmake -DENABLE_GPERFTOOLS=ON
parent 166aef82
...@@ -18,6 +18,7 @@ endif() ...@@ -18,6 +18,7 @@ endif()
option(ENABLE_CCACHE "enable caching compiler output" ON) option(ENABLE_CCACHE "enable caching compiler output" ON)
option(ENABLE_GIL "threading use GIL" ON) option(ENABLE_GIL "threading use GIL" ON)
option(ENABLE_GOLD "enable the gold linker" ON) option(ENABLE_GOLD "enable the gold linker" ON)
option(ENABLE_GPERFTOOLS "enable the google performance tools" OFF)
option(ENABLE_GRWL "threading use GRWL" OFF) option(ENABLE_GRWL "threading use GRWL" OFF)
option(ENABLE_INTEL_JIT_EVENTS "LLVM support for Intel JIT Events API" OFF) option(ENABLE_INTEL_JIT_EVENTS "LLVM support for Intel JIT Events API" OFF)
option(ENABLE_LLVM_DEBUG "LLVM debug symbols" OFF) option(ENABLE_LLVM_DEBUG "LLVM debug symbols" OFF)
...@@ -120,6 +121,10 @@ else() ...@@ -120,6 +121,10 @@ else()
add_definitions(-DTHREADING_USE_GIL=1 -DTHREADING_USE_GRWL=0) add_definitions(-DTHREADING_USE_GIL=1 -DTHREADING_USE_GRWL=0)
endif() endif()
if(ENABLE_GPERFTOOLS)
set(OPTIONAL_LIBRARIES ${OPTIONAL_LIBRARIES} profiler)
endif()
if(ENABLE_OPROFILE) if(ENABLE_OPROFILE)
set(OPTIONAL_LIBRARIES ${OPTIONAL_LIBRARIES} opagent) set(OPTIONAL_LIBRARIES ${OPTIONAL_LIBRARIES} opagent)
endif() endif()
......
...@@ -20,6 +20,10 @@ file(GLOB GC_SRCS gc/*.cpp) ...@@ -20,6 +20,10 @@ file(GLOB GC_SRCS gc/*.cpp)
file(GLOB RUNTIME_BUILTIN_MODULES_SRCS runtime/builtin_modules/*.cpp) file(GLOB RUNTIME_BUILTIN_MODULES_SRCS runtime/builtin_modules/*.cpp)
file(GLOB RUNTIME_SRCS runtime/*.cpp) file(GLOB RUNTIME_SRCS runtime/*.cpp)
if(ENABLE_GPERFTOOLS)
set(OPTIONAL_SRCS ${OPTIONAL_SRCS} codegen/profiling/pprof.cpp)
endif()
if(ENABLE_OPROFILE) if(ENABLE_OPROFILE)
set(OPTIONAL_SRCS codegen/profiling/oprofile.cpp) set(OPTIONAL_SRCS codegen/profiling/oprofile.cpp)
endif() endif()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment