Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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], [], [
Expand All @@ -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], [ ], [ ])
Expand Down
3 changes: 2 additions & 1 deletion include/jemalloc/internal/jemalloc_internal_defs.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down