Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
cd92bc38
Commit
cd92bc38
authored
Aug 30, 2013
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
start using jemalloc
parent
253366e7
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
39 additions
and
1 deletion
+39
-1
.bzrignore
.bzrignore
+2
-0
CMakeLists.txt
CMakeLists.txt
+3
-0
cmake/jemalloc.cmake
cmake/jemalloc.cmake
+33
-0
sql/CMakeLists.txt
sql/CMakeLists.txt
+1
-1
No files found.
.bzrignore
View file @
cd92bc38
...
...
@@ -1148,3 +1148,5 @@ typescript
mysql-test/collections/default.release.done
sql/sql_yacc.hh
packaging/solaris/postinstall-solaris
extra/jemalloc/jemalloc-*
extra/jemalloc/build
CMakeLists.txt
View file @
cd92bc38
...
...
@@ -144,6 +144,7 @@ INCLUDE(ssl)
INCLUDE
(
readline
)
INCLUDE
(
libutils
)
INCLUDE
(
dtrace
)
INCLUDE
(
jemalloc
)
INCLUDE
(
ctest
)
INCLUDE
(
plugin
)
INCLUDE
(
install_macros
)
...
...
@@ -263,6 +264,8 @@ MYSQL_CHECK_SSL()
# Add readline or libedit.
MYSQL_CHECK_READLINE
()
CHECK_JEMALLOC
()
#
# Setup maintainer mode options by the end. Platform checks are
# not run with the warning options as to not perturb fragile checks
...
...
cmake/jemalloc.cmake
0 → 100644
View file @
cd92bc38
INCLUDE
(
ExternalProject
)
MACRO
(
USE_BUNDLED_JEMALLOC
)
SET
(
SOURCE_DIR
"
${
CMAKE_SOURCE_DIR
}
/extra/jemalloc"
)
SET
(
BINARY_DIR
"
${
CMAKE_BINARY_DIR
}
/
${
CMAKE_CFG_INTDIR
}
/extra/jemalloc/build"
)
SET
(
LIBJEMALLOC
"
${
BINARY_DIR
}
/lib/libjemalloc_pic.a"
)
SET
(
JEMALLOC_CONFIGURE_OPTS
"CC=
${
CMAKE_C_COMPILER
}
"
"--with-private-namespace=jemalloc_internal_"
"--enable-cc-silence"
)
IF
(
CMAKE_BUILD_TYPE MATCHES
"Debug"
AND NOT APPLE
)
# see the comment in CMakeLists.txt
LIST
(
APPEND JEMALLOC_CONFIGURE_OPTS --enable-debug
)
ENDIF
()
ExternalProject_Add
(
jemalloc
PREFIX extra/jemalloc
SOURCE_DIR
${
SOURCE_DIR
}
BINARY_DIR
${
BINARY_DIR
}
STAMP_DIR
${
SOURCE_DIR
}
CONFIGURE_COMMAND
"
${
SOURCE_DIR
}
/configure"
${
JEMALLOC_CONFIGURE_OPTS
}
BUILD_COMMAND
${
CMAKE_MAKE_PROGRAM
}
"build_lib_static"
INSTALL_COMMAND
""
)
ADD_LIBRARY
(
libjemalloc STATIC IMPORTED
)
SET_TARGET_PROPERTIES
(
libjemalloc PROPERTIES IMPORTED_LOCATION
${
LIBJEMALLOC
}
)
ADD_DEPENDENCIES
(
libjemalloc jemalloc
)
ENDMACRO
()
SET
(
WITH_JEMALLOC
"yes"
CACHE STRING
"Which jemalloc to use (possible values are 'no', 'bundled', 'yes' (same as bundled)"
)
#"Which jemalloc to use (possible values are 'no', 'bundled', 'system', 'yes' (system if possible, otherwise bundled)")
MACRO
(
CHECK_JEMALLOC
)
IF
(
WITH_JEMALLOC STREQUAL
"bundled"
OR WITH_JEMALLOC STREQUAL
"yes"
)
USE_BUNDLED_JEMALLOC
()
ENDIF
()
ENDMACRO
()
sql/CMakeLists.txt
View file @
cd92bc38
...
...
@@ -103,7 +103,7 @@ ADD_DEPENDENCIES(sql GenServerSource)
DTRACE_INSTRUMENT
(
sql
)
TARGET_LINK_LIBRARIES
(
sql
${
MYSQLD_STATIC_PLUGIN_LIBS
}
mysys dbug strings vio regex
${
LIBWRAP
}
${
LIBCRYPT
}
${
LIBDL
}
${
LIBWRAP
}
${
LIBCRYPT
}
${
LIBDL
}
${
LIBJEMALLOC
}
${
CMAKE_THREAD_LIBS_INIT
}
${
SSL_LIBRARIES
}
)
IF
(
WIN32
)
...
...
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