summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.travis.yml20
-rw-r--r--doc/jemalloc.xml.in4
-rw-r--r--include/jemalloc/internal/arena_types.h5
-rwxr-xr-xscripts/gen_run_tests.py12
-rwxr-xr-xscripts/gen_travis.py6
5 files changed, 36 insertions, 11 deletions
diff --git a/.travis.yml b/.travis.yml
index 6ca3ac4..917314f 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -24,6 +24,8 @@ matrix:
env: CC=gcc CXX=g++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--with-malloc-conf=tcache:false" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
- os: linux
env: CC=gcc CXX=g++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--with-malloc-conf=dss:primary" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
+ - os: linux
+ env: CC=gcc CXX=g++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--with-malloc-conf=percpu_arena:percpu" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
- os: osx
env: CC=clang CXX=clang++ COMPILER_FLAGS="" CONFIGURE_FLAGS="" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
- os: osx
@@ -51,6 +53,8 @@ matrix:
- os: linux
env: CC=clang CXX=clang++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--with-malloc-conf=dss:primary" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
- os: linux
+ env: CC=clang CXX=clang++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--with-malloc-conf=percpu_arena:percpu" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
+ - os: linux
env: CC=gcc CXX=g++ COMPILER_FLAGS="-m32" CONFIGURE_FLAGS="--enable-debug" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
addons:
apt:
@@ -81,6 +85,12 @@ matrix:
packages:
- gcc-multilib
- os: linux
+ env: CC=gcc CXX=g++ COMPILER_FLAGS="-m32" CONFIGURE_FLAGS="--with-malloc-conf=percpu_arena:percpu" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
+ addons:
+ apt:
+ packages:
+ - gcc-multilib
+ - os: linux
env: CC=gcc CXX=g++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--enable-debug --enable-prof" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
- os: linux
env: CC=gcc CXX=g++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--enable-debug --disable-stats" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
@@ -89,17 +99,27 @@ matrix:
- os: linux
env: CC=gcc CXX=g++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--enable-debug --with-malloc-conf=dss:primary" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
- os: linux
+ env: CC=gcc CXX=g++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--enable-debug --with-malloc-conf=percpu_arena:percpu" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
+ - os: linux
env: CC=gcc CXX=g++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--enable-prof --disable-stats" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
- os: linux
env: CC=gcc CXX=g++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--enable-prof --with-malloc-conf=tcache:false" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
- os: linux
env: CC=gcc CXX=g++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--enable-prof --with-malloc-conf=dss:primary" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
- os: linux
+ env: CC=gcc CXX=g++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--enable-prof --with-malloc-conf=percpu_arena:percpu" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
+ - os: linux
env: CC=gcc CXX=g++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--disable-stats --with-malloc-conf=tcache:false" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
- os: linux
env: CC=gcc CXX=g++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--disable-stats --with-malloc-conf=dss:primary" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
- os: linux
+ env: CC=gcc CXX=g++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--disable-stats --with-malloc-conf=percpu_arena:percpu" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
+ - os: linux
env: CC=gcc CXX=g++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--with-malloc-conf=tcache:false,dss:primary" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
+ - os: linux
+ env: CC=gcc CXX=g++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--with-malloc-conf=tcache:false,percpu_arena:percpu" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
+ - os: linux
+ env: CC=gcc CXX=g++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--with-malloc-conf=dss:primary,percpu_arena:percpu" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
before_script:
diff --git a/doc/jemalloc.xml.in b/doc/jemalloc.xml.in
index 57f5b0b..16d9ce4 100644
--- a/doc/jemalloc.xml.in
+++ b/doc/jemalloc.xml.in
@@ -952,8 +952,8 @@ mallctl("arena." STRINGIFY(MALLCTL_ARENAS_ALL) ".decay",
same CPU share one arena. Note that no runtime checking regarding the
availability of hyper threading is done at the moment. When set to
<quote>disabled</quote>, narenas and thread to arena association will
- not be impacted by this option. The default is
- <quote>percpu</quote>. </para></listitem>
+ not be impacted by this option. The default is <quote>disabled</quote>.
+ </para></listitem>
</varlistentry>
<varlistentry id="opt.background_thread">
diff --git a/include/jemalloc/internal/arena_types.h b/include/jemalloc/internal/arena_types.h
index 34d4f6f..1374eec 100644
--- a/include/jemalloc/internal/arena_types.h
+++ b/include/jemalloc/internal/arena_types.h
@@ -29,12 +29,7 @@ typedef enum {
percpu_arena_mode_limit = 3
} percpu_arena_mode_t;
-#ifdef JEMALLOC_PERCPU_ARENA
-#define PERCPU_ARENA_MODE_DEFAULT percpu_arena
-#define OPT_PERCPU_ARENA_DEFAULT "percpu"
-#else
#define PERCPU_ARENA_MODE_DEFAULT percpu_arena_disabled
#define OPT_PERCPU_ARENA_DEFAULT "disabled"
-#endif
#endif /* JEMALLOC_INTERNAL_ARENA_TYPES_H */
diff --git a/scripts/gen_run_tests.py b/scripts/gen_run_tests.py
index 9fbf71e..875c6d0 100755
--- a/scripts/gen_run_tests.py
+++ b/scripts/gen_run_tests.py
@@ -23,6 +23,7 @@ possible_config_opts = [
possible_malloc_conf_opts = [
'tcache:false',
'dss:primary',
+ 'percpu_arena:percpu',
]
print 'set -e'
@@ -45,13 +46,20 @@ for cc, cxx in possible_compilers:
",".join(malloc_conf_opts) if len(malloc_conf_opts) > 0
else '')
)
+
+ # Per CPU arenas are only supported on Linux.
+ linux_supported = ('percpu_arena:percpu' in malloc_conf_opts)
# Heap profiling and dss are not supported on OS X.
darwin_unsupported = ('--enable-prof' in config_opts or \
'dss:primary' in malloc_conf_opts)
- if darwin_unsupported:
+ if linux_supported:
+ print 'if [[ "$unamestr" = "Linux" ]]; then'
+ elif darwin_unsupported:
print 'if [[ "$unamestr" != "Darwin" ]]; then'
+
print config_line
print "make clean"
print "make -j" + str(MAKE_J_VAL) + " check"
- if darwin_unsupported:
+
+ if linux_supported or darwin_unsupported:
print 'fi'
diff --git a/scripts/gen_travis.py b/scripts/gen_travis.py
index 4a4c214..26997b2 100755
--- a/scripts/gen_travis.py
+++ b/scripts/gen_travis.py
@@ -48,6 +48,7 @@ configure_flag_unusuals = [
malloc_conf_unusuals = [
'tcache:false',
'dss:primary',
+ 'percpu_arena:percpu',
]
all_unusuals = (
@@ -77,8 +78,9 @@ for unusual_combination in unusual_combinations_to_test:
malloc_conf = [
x for x in unusual_combination if x in malloc_conf_unusuals]
- # Filter out an unsupported configuration - dss on OS X.
- if os == 'osx' and 'dss:primary' in malloc_conf:
+ # Filter out unsupported configurations on OS X.
+ if os == 'osx' and ('dss:primary' in malloc_conf or \
+ 'percpu_arena:percpu' in malloc_conf):
continue
if len(malloc_conf) > 0:
configure_flags.append('--with-malloc-conf=' + ",".join(malloc_conf))