Skip to content

Commit b1aaa74

Browse files
committed
Enable tcache prefetching by default.
1 parent c0889ac commit b1aaa74

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

configure.ac

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1434,13 +1434,16 @@ if test "x$enable_experimental_smallocx" = "x1" ; then
14341434
fi
14351435
AC_SUBST([enable_experimental_smallocx])
14361436

1437-
dnl Do not enable fastpath prefetch by default.
1437+
dnl Enable fastpath prefetch by default.
14381438
AC_ARG_ENABLE([experimental_fp_prefetch],
1439-
[AS_HELP_STRING([--enable-experimental-fp-prefetch], [Enable experimental fastpath prefetch])],
1439+
[AS_HELP_STRING([--disable-experimental-fp-prefetch], [Disable experimental fastpath prefetch])],
14401440
[if test "x$enable_experimental_fp_prefetch" = "xno" ; then
1441-
enable_experimental_fp_prefetch="0"
1441+
enable_experimental_fp_prefetch="0"
14421442
else
1443-
dnl Check if we have __builtin_prefetch.
1443+
enable_experimental_fp_prefetch="1"
1444+
fi
1445+
],
1446+
[dnl Check if we have __builtin_prefetch to enable by default.
14441447
JE_CFLAGS_SAVE()
14451448
JE_CFLAGS_ADD([-Werror=implicit-function-declaration])
14461449
JE_COMPILABLE([builtin prefetch], [], [
@@ -1452,12 +1455,9 @@ void foo(void *p) { __builtin_prefetch(p, 1, 3); }
14521455
enable_experimental_fp_prefetch="1"
14531456
else
14541457
enable_experimental_fp_prefetch="0"
1455-
AC_MSG_ERROR([--enable--experimental-fp-prefetch can only be used when builtin_preftech is available])
14561458
fi
14571459
JE_CFLAGS_RESTORE()
1458-
fi
1459-
],
1460-
[enable_experimental_fp_prefetch="0"]
1460+
]
14611461
)
14621462
if test "x$enable_experimental_fp_prefetch" = "x1" ; then
14631463
AC_DEFINE([JEMALLOC_EXPERIMENTAL_FASTPATH_PREFETCH], [ ], [ ])

include/jemalloc/internal/jemalloc_internal_defs.h.in

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,8 @@
160160
/* JEMALLOC_EXPERIMENTAL_SMALLOCX_API enables experimental smallocx API. */
161161
#undef JEMALLOC_EXPERIMENTAL_SMALLOCX_API
162162

163-
/* JEMALLOC_EXPERIMENTAL_FASTPATH_PREFETCH enables prefetch
163+
/*
164+
* JEMALLOC_EXPERIMENTAL_FASTPATH_PREFETCH enables prefetch
164165
* on malloc fast path.
165166
*/
166167
#undef JEMALLOC_EXPERIMENTAL_FASTPATH_PREFETCH

0 commit comments

Comments
 (0)