diff --git a/configure.ac b/configure.ac index 8ea092d65..faf65c6de 100644 --- a/configure.ac +++ b/configure.ac @@ -1434,13 +1434,16 @@ if test "x$enable_experimental_smallocx" = "x1" ; then fi AC_SUBST([enable_experimental_smallocx]) -dnl Do not enable fastpath prefetch by default. +dnl Enable fastpath prefetch by default. AC_ARG_ENABLE([experimental_fp_prefetch], - [AS_HELP_STRING([--enable-experimental-fp-prefetch], [Enable experimental fastpath prefetch])], + [AS_HELP_STRING([--disable-experimental-fp-prefetch], [Disable experimental fastpath prefetch])], [if test "x$enable_experimental_fp_prefetch" = "xno" ; then -enable_experimental_fp_prefetch="0" + enable_experimental_fp_prefetch="0" else - dnl Check if we have __builtin_prefetch. + enable_experimental_fp_prefetch="1" +fi +], +[dnl Check if we have __builtin_prefetch to enable by default. JE_CFLAGS_SAVE() JE_CFLAGS_ADD([-Werror=implicit-function-declaration]) JE_COMPILABLE([builtin prefetch], [], [ @@ -1452,12 +1455,9 @@ void foo(void *p) { __builtin_prefetch(p, 1, 3); } enable_experimental_fp_prefetch="1" else enable_experimental_fp_prefetch="0" - AC_MSG_ERROR([--enable--experimental-fp-prefetch can only be used when builtin_preftech is available]) fi JE_CFLAGS_RESTORE() -fi -], -[enable_experimental_fp_prefetch="0"] +] ) if test "x$enable_experimental_fp_prefetch" = "x1" ; then AC_DEFINE([JEMALLOC_EXPERIMENTAL_FASTPATH_PREFETCH], [ ], [ ]) diff --git a/include/jemalloc/internal/jemalloc_internal_defs.h.in b/include/jemalloc/internal/jemalloc_internal_defs.h.in index 3a945ba1e..15043de2b 100644 --- a/include/jemalloc/internal/jemalloc_internal_defs.h.in +++ b/include/jemalloc/internal/jemalloc_internal_defs.h.in @@ -160,7 +160,8 @@ /* JEMALLOC_EXPERIMENTAL_SMALLOCX_API enables experimental smallocx API. */ #undef JEMALLOC_EXPERIMENTAL_SMALLOCX_API -/* JEMALLOC_EXPERIMENTAL_FASTPATH_PREFETCH enables prefetch +/* + * JEMALLOC_EXPERIMENTAL_FASTPATH_PREFETCH enables prefetch * on malloc fast path. */ #undef JEMALLOC_EXPERIMENTAL_FASTPATH_PREFETCH