Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
Actor Framework
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cpp-libs
Actor Framework
Commits
f91da82e
Commit
f91da82e
authored
May 06, 2017
by
Sebastian Woelke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add support for tcmalloc
parent
0afd7caf
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
73 additions
and
0 deletions
+73
-0
CMakeLists.txt
CMakeLists.txt
+20
-0
cmake/FindTcmalloc.cmake
cmake/FindTcmalloc.cmake
+43
-0
configure
configure
+10
-0
No files found.
CMakeLists.txt
View file @
f91da82e
...
@@ -81,6 +81,10 @@ if(NOT CAF_NO_HWLOC)
...
@@ -81,6 +81,10 @@ if(NOT CAF_NO_HWLOC)
set
(
CAF_NO_HWLOC no
)
set
(
CAF_NO_HWLOC no
)
endif
()
endif
()
if
(
NOT CAF_NO_TCMALLOC
)
set
(
CAF_NO_TCMALLOC no
)
endif
()
if
(
NOT CAF_NO_PYTHON
)
if
(
NOT CAF_NO_PYTHON
)
set
(
CAF_NO_PYTHON no
)
set
(
CAF_NO_PYTHON no
)
endif
()
endif
()
...
@@ -286,6 +290,19 @@ if(NOT CAF_NO_HWLOC)
...
@@ -286,6 +290,19 @@ if(NOT CAF_NO_HWLOC)
set
(
CAF_NO_HWLOC yes
)
set
(
CAF_NO_HWLOC yes
)
endif
()
endif
()
endif
()
endif
()
# load tcmalloc library if not told otherwise
if
(
NOT CAF_NO_TCMALLOC
)
find_package
(
Tcmalloc
)
if
(
Tcmalloc_FOUND
)
set
(
LD_FLAGS
${
LD_FLAGS
}
${
Tcmalloc_LIBRARIES
}
)
# load gperf cpuprofiler if configured
if
(
CAF_GPERF_CPUPROFILER
)
set
(
LD_FLAGS
"
${
LD_FLAGS
}
-lprofiler"
)
endif
()
else
()
set
(
CAF_NO_TCMALLOC yes
)
endif
()
endif
()
# -fPIC generates warnings on MinGW and Cygwin plus extra setup steps needed on MinGW
# -fPIC generates warnings on MinGW and Cygwin plus extra setup steps needed on MinGW
if
(
MINGW
)
if
(
MINGW
)
add_definitions
(
-D_WIN32_WINNT=0x0600
)
add_definitions
(
-D_WIN32_WINNT=0x0600
)
...
@@ -355,6 +372,7 @@ macro(to_int_value name)
...
@@ -355,6 +372,7 @@ macro(to_int_value name)
endmacro
()
endmacro
()
to_int_value
(
CAF_NO_HWLOC
)
to_int_value
(
CAF_NO_HWLOC
)
to_int_value
(
CAF_NO_TCMALLOC
)
to_int_value
(
CAF_LOG_LEVEL
)
to_int_value
(
CAF_LOG_LEVEL
)
to_int_value
(
CAF_NO_EXCEPTIONS
)
to_int_value
(
CAF_NO_EXCEPTIONS
)
to_int_value
(
CAF_NO_MEM_MANAGEMENT
)
to_int_value
(
CAF_NO_MEM_MANAGEMENT
)
...
@@ -700,6 +718,7 @@ invertYesNo(CAF_NO_MEM_MANAGEMENT CAF_BUILD_MEM_MANAGEMENT)
...
@@ -700,6 +718,7 @@ invertYesNo(CAF_NO_MEM_MANAGEMENT CAF_BUILD_MEM_MANAGEMENT)
invertYesNo
(
CAF_NO_BENCHMARKS CAF_BUILD_BENCHMARKS
)
invertYesNo
(
CAF_NO_BENCHMARKS CAF_BUILD_BENCHMARKS
)
invertYesNo
(
CAF_NO_OPENCL CAF_BUILD_OPENCL
)
invertYesNo
(
CAF_NO_OPENCL CAF_BUILD_OPENCL
)
invertYesNo
(
CAF_NO_HWLOC CAF_BUILD_HWLOC
)
invertYesNo
(
CAF_NO_HWLOC CAF_BUILD_HWLOC
)
invertYesNo
(
CAF_NO_TCMALLOC CAF_BUILD_TCMALLOC
)
invertYesNo
(
CAF_NO_PYTHON CAF_BUILD_PYTHON
)
invertYesNo
(
CAF_NO_PYTHON CAF_BUILD_PYTHON
)
# collect all compiler flags
# collect all compiler flags
string
(
TOUPPER
"
${
CMAKE_BUILD_TYPE
}
"
UPPER_BUILD_TYPE
)
string
(
TOUPPER
"
${
CMAKE_BUILD_TYPE
}
"
UPPER_BUILD_TYPE
)
...
@@ -726,6 +745,7 @@ if(NOT CAF_NO_SUMMARY)
...
@@ -726,6 +745,7 @@ if(NOT CAF_NO_SUMMARY)
"
\n
Build benchmarks:
${
CAF_BUILD_BENCHMARKS
}
"
"
\n
Build benchmarks:
${
CAF_BUILD_BENCHMARKS
}
"
"
\n
Build opencl:
${
CAF_BUILD_OPENCL
}
"
"
\n
Build opencl:
${
CAF_BUILD_OPENCL
}
"
"
\n
Build hwloc:
${
CAF_BUILD_HWLOC
}
"
"
\n
Build hwloc:
${
CAF_BUILD_HWLOC
}
"
"
\n
Build tcmalloc:
${
CAF_BUILD_TCMALLOC
}
"
"
\n
Build Python:
${
CAF_BUILD_PYTHON
}
"
"
\n
Build Python:
${
CAF_BUILD_PYTHON
}
"
"
\n
"
"
\n
"
"
\n
CXX:
${
CMAKE_CXX_COMPILER
}
"
"
\n
CXX:
${
CMAKE_CXX_COMPILER
}
"
...
...
cmake/FindTcmalloc.cmake
0 → 100644
View file @
f91da82e
# - Find Tcmalloc
# Find the native Tcmalloc includes and library
#
# Tcmalloc_INCLUDE_DIR - where to find Tcmalloc.h, etc.
# Tcmalloc_LIBRARIES - List of libraries when using Tcmalloc.
# Tcmalloc_FOUND - True if Tcmalloc found.
find_path
(
Tcmalloc_INCLUDE_DIR google/tcmalloc.h NO_DEFAULT_PATH PATHS
${
HT_DEPENDENCY_INCLUDE_DIR
}
/usr/include
/opt/local/include
/usr/local/include
)
set
(
Tcmalloc_NAMES tcmalloc
)
find_library
(
Tcmalloc_LIBRARY NO_DEFAULT_PATH
NAMES
${
Tcmalloc_NAMES
}
PATHS
${
HT_DEPENDENCY_LIB_DIR
}
/lib /usr/lib /usr/local/lib /opt/local/lib
)
if
(
Tcmalloc_INCLUDE_DIR AND Tcmalloc_LIBRARY
)
set
(
Tcmalloc_FOUND TRUE
)
set
(
Tcmalloc_LIBRARIES
${
Tcmalloc_LIBRARY
}
)
else
()
set
(
Tcmalloc_FOUND FALSE
)
set
(
Tcmalloc_LIBRARIES
)
endif
()
if
(
Tcmalloc_FOUND
)
message
(
STATUS
"Found Tcmalloc:
${
Tcmalloc_LIBRARY
}
"
)
else
()
message
(
STATUS
"Not Found Tcmalloc:
${
Tcmalloc_LIBRARY
}
"
)
if
(
Tcmalloc_FIND_REQUIRED
)
message
(
STATUS
"Looked for Tcmalloc libraries named
${
Tcmalloc_NAMES
}
."
)
message
(
FATAL_ERROR
"Could NOT find Tcmalloc library"
)
endif
()
endif
()
mark_as_advanced
(
Tcmalloc_LIBRARY
Tcmalloc_INCLUDE_DIR
)
configure
View file @
f91da82e
...
@@ -66,6 +66,7 @@ Usage: $0 [OPTION]... [VAR=VALUE]...
...
@@ -66,6 +66,7 @@ Usage: $0 [OPTION]... [VAR=VALUE]...
--no-unit-tests build without unit tests
--no-unit-tests build without unit tests
--no-opencl build without OpenCL module
--no-opencl build without OpenCL module
--no-hwloc build without NUMA related optimizations
--no-hwloc build without NUMA related optimizations
--no-tcmalloc build without tcmalloc
--no-benchmarks build without benchmarks
--no-benchmarks build without benchmarks
--no-tools build without CAF tools such as caf-run
--no-tools build without CAF tools such as caf-run
--no-io build without I/O module
--no-io build without I/O module
...
@@ -85,6 +86,9 @@ Usage: $0 [OPTION]... [VAR=VALUE]...
...
@@ -85,6 +86,9 @@ Usage: $0 [OPTION]... [VAR=VALUE]...
- TRACE
- TRACE
--with-address-sanitizer build with address sanitizer if available
--with-address-sanitizer build with address sanitizer if available
--with-gcov build with gcov coverage enabled
--with-gcov build with gcov coverage enabled
--with-gperf-cpuprofiler build with cpu profiler (requires environment variable
CPUPROFILE=/path/to/output/file/prof.out
on start up for)
Influential Environment Variables (only on first invocation):
Influential Environment Variables (only on first invocation):
CXX C++ compiler command
CXX C++ compiler command
...
@@ -343,6 +347,12 @@ while [ $# -ne 0 ]; do
...
@@ -343,6 +347,12 @@ while [ $# -ne 0 ]; do
--no-hwloc
)
--no-hwloc
)
append_cache_entry CAF_NO_HWLOC BOOL
yes
append_cache_entry CAF_NO_HWLOC BOOL
yes
;;
;;
--no-tcmalloc
)
append_cache_entry CAF_NO_TCMALLOC BOOL
yes
;;
--with-gperf-cpuprofiler
)
append_cache_entry CAF_GPERF_CPUPROFILER BOOL
yes
;;
--build-static
)
--build-static
)
append_cache_entry CAF_BUILD_STATIC BOOL
yes
append_cache_entry CAF_BUILD_STATIC BOOL
yes
;;
;;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment