[med-svn] [spades] 03/04: use Debian provided jemalloc

Sascha Steinbiss sascha at steinbiss.name
Sun Feb 21 23:16:00 UTC 2016


This is an automated email from the git hooks/post-receive script.

sascha-guest pushed a commit to branch master
in repository spades.

commit 70141896be52c3c5838c28ae6563d683cdfee799
Author: Sascha Steinbiss <sascha at steinbiss.name>
Date:   Sun Feb 21 23:10:57 2016 +0000

    use Debian provided jemalloc
---
 .../0114_use_debian_provided_jemalloc.patch        | 85 ++++++++++++++++++++++
 1 file changed, 85 insertions(+)

diff --git a/debian/patches/0114_use_debian_provided_jemalloc.patch b/debian/patches/0114_use_debian_provided_jemalloc.patch
new file mode 100644
index 0000000..9d5e172
--- /dev/null
+++ b/debian/patches/0114_use_debian_provided_jemalloc.patch
@@ -0,0 +1,85 @@
+Description: use Debian-packaged jemalloc library 
+ To improve building on non-amd64 archs, it is necessary to not
+ use the unpatched libjemalloc copy bundled by upstream. This patch
+ makes sure spades links against the packaged copy and no local
+ version is built any more.
+ The log output of this version will be different from the one of a
+ version using the bundled jemalloc as the jemalloc version in Debian
+ does not report the 'stats.cactive_max' mallctl stat anymore.
+ Hence to avoid a NULL dereference the max rss value is logged.
+Author: Sascha Steinbiss <sascha at steinbiss.name>
+--- a/ext/src/CMakeLists.txt
++++ b/ext/src/CMakeLists.txt
+@@ -1,10 +1,9 @@
+ # -*- cmake -*-
+ 
+-add_subdirectory(jemalloc)
+ add_subdirectory(nlopt)
+ add_subdirectory(yaml-cpp)
+ add_subdirectory(ConsensusCore)
+ add_subdirectory(bamtools)
+ add_subdirectory(samtools)
+ add_subdirectory(cppformat)
+-add_subdirectory(ssw)
+\ No newline at end of file
++add_subdirectory(ssw)
+--- a/src/cmake/includes.cmake
++++ b/src/cmake/includes.cmake
+@@ -3,6 +3,8 @@
+ set(CMAKE_INCLUDE_CURRENT_DIR ON)
+ set(CMAKE_INCLUDE_SYSTEM_FLAG_C "-isystem ")
+ set(CMAKE_INCLUDE_SYSTEM_FLAG_CXX "-isystem ")
++include_directories("/usr/include")
++include_directories(SYSTEM "/usr/include")
+ include_directories(${SPADES_MAIN_INCLUDE_DIR} ${SPADES_BUILT_INCLUDE_DIR})
+ include_directories(SYSTEM "${EXT_DIR}/include")
+ include_directories(SYSTEM "${ZLIB_INCLUDE_DIRS}")
+--- a/src/cmake/flags.cmake
++++ b/src/cmake/flags.cmake
+@@ -53,3 +53,5 @@
+ if (SPADES_USE_TCMALLOC)
+   add_compile_options(-fno-omit-frame-pointer)
+ endif()
++
++add_definitions(-DJEMALLOC_NO_DEMANGLE)
+\ No newline at end of file
+--- a/src/io/logger_impl.cpp
++++ b/src/io/logger_impl.cpp
+@@ -13,6 +13,7 @@
+ #include <vector>
+ 
+ #include "logger/logger.hpp"
++#include "memory_limit.hpp"
+ 
+ #include "config.hpp"
+ 
+@@ -101,14 +102,15 @@
+ 
+ void logger::log(level desired_level, const char* file, size_t line_num, const char* source, const char* msg) {
+   double time = timer_.time();
+-  const size_t *cmem = 0, *cmem_max = 0;
+-  size_t clen = sizeof(cmem);
++  const size_t *cmem = 0;
++  size_t clen = sizeof(cmem), cmem_max = 0;
+ 
+   je_mallctl("stats.cactive", &cmem, &clen, NULL, 0);
+-  je_mallctl("stats.cactive_max", &cmem_max, &clen, NULL, 0);
++  //je_mallctl("stats.cactive_max", &cmem_max, &clen, NULL, 0);
++  cmem_max = get_max_rss();
+ 
+   for (auto it = writers_.begin(); it != writers_.end(); ++it)
+-    (*it)->write_msg(time, (*cmem) / 1024, (*cmem_max) / 1024, desired_level, file, line_num, source, msg);
++    (*it)->write_msg(time, (*cmem) / 1024, cmem_max, desired_level, file, line_num, source, msg);
+ }
+ #else
+ void logger::log(level desired_level, const char* file, size_t line_num, const char* source, const char* msg) {
+--- a/src/include/memory_limit.hpp
++++ b/src/include/memory_limit.hpp
+@@ -18,6 +18,7 @@
+ #include <sys/resource.h>
+ 
+ #include "config.hpp"
++#include "verify.hpp"
+ 
+ #ifdef SPADES_USE_JEMALLOC
+ # include <jemalloc/jemalloc.h>

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/spades.git



More information about the debian-med-commit mailing list