summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Evans <jasone@canonware.com>2015-07-17 23:38:25 (GMT)
committerJason Evans <jasone@canonware.com>2015-07-17 23:38:25 (GMT)
commitf2bc85298c1cd6f4e95fbbeeb7ccc32ff52a1d8f (patch)
treebddad6b2ae834d0f659d25ad779b49a777f5689c
parent37fd1115c38accc319a82f17c0e9262091844cac (diff)
downloadjemalloc-f2bc85298c1cd6f4e95fbbeeb7ccc32ff52a1d8f.zip
jemalloc-f2bc85298c1cd6f4e95fbbeeb7ccc32ff52a1d8f.tar.gz
jemalloc-f2bc85298c1cd6f4e95fbbeeb7ccc32ff52a1d8f.tar.bz2
Add the config.cache_oblivious mallctl.
-rw-r--r--ChangeLog3
-rw-r--r--doc/jemalloc.xml.in10
-rw-r--r--src/ctl.c3
-rw-r--r--test/unit/mallctl.c1
4 files changed, 16 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 950c656..fe62e52 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -102,7 +102,8 @@ brevity. Much more detail can be found in the git revision history:
cache set distribution.
- Randomly distribute large allocation base pointer alignment relative to page
boundaries in order to more uniformly utilize CPU cache sets. This can be
- disabled via the --disable-cache-oblivious configure option.
+ disabled via the --disable-cache-oblivious configure option, and queried via
+ the "config.cache_oblivious" mallctl.
- Micro-optimize the fast paths for the public API functions.
- Refactor thread-specific data to reside in a single structure. This assures
that only a single TLS read is necessary per call into the public API.
diff --git a/doc/jemalloc.xml.in b/doc/jemalloc.xml.in
index eb677ad..dbbe837 100644
--- a/doc/jemalloc.xml.in
+++ b/doc/jemalloc.xml.in
@@ -731,6 +731,16 @@ for (i = 0; i < nbins; i++) {
detecting whether another thread caused a refresh.</para></listitem>
</varlistentry>
+ <varlistentry id="config.cache_oblivious">
+ <term>
+ <mallctl>config.cache_oblivious</mallctl>
+ (<type>bool</type>)
+ <literal>r-</literal>
+ </term>
+ <listitem><para><option>--enable-cache-oblivious</option> was specified
+ during build configuration.</para></listitem>
+ </varlistentry>
+
<varlistentry id="config.debug">
<term>
<mallctl>config.debug</mallctl>
diff --git a/src/ctl.c b/src/ctl.c
index d215b19..1988aee 100644
--- a/src/ctl.c
+++ b/src/ctl.c
@@ -73,6 +73,7 @@ CTL_PROTO(thread_allocated)
CTL_PROTO(thread_allocatedp)
CTL_PROTO(thread_deallocated)
CTL_PROTO(thread_deallocatedp)
+CTL_PROTO(config_cache_oblivious)
CTL_PROTO(config_debug)
CTL_PROTO(config_fill)
CTL_PROTO(config_lazy_lock)
@@ -238,6 +239,7 @@ static const ctl_named_node_t thread_node[] = {
};
static const ctl_named_node_t config_node[] = {
+ {NAME("cache_oblivious"), CTL(config_cache_oblivious)},
{NAME("debug"), CTL(config_debug)},
{NAME("fill"), CTL(config_fill)},
{NAME("lazy_lock"), CTL(config_lazy_lock)},
@@ -1247,6 +1249,7 @@ label_return:
/******************************************************************************/
+CTL_RO_BOOL_CONFIG_GEN(config_cache_oblivious)
CTL_RO_BOOL_CONFIG_GEN(config_debug)
CTL_RO_BOOL_CONFIG_GEN(config_fill)
CTL_RO_BOOL_CONFIG_GEN(config_lazy_lock)
diff --git a/test/unit/mallctl.c b/test/unit/mallctl.c
index 29823a6..31e354c 100644
--- a/test/unit/mallctl.c
+++ b/test/unit/mallctl.c
@@ -126,6 +126,7 @@ TEST_BEGIN(test_mallctl_config)
assert_zu_eq(sz, sizeof(oldval), "Unexpected output size"); \
} while (0)
+ TEST_MALLCTL_CONFIG(cache_oblivious);
TEST_MALLCTL_CONFIG(debug);
TEST_MALLCTL_CONFIG(fill);
TEST_MALLCTL_CONFIG(lazy_lock);