summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorJason Evans <jasone@canonware.com>2012-04-05 20:36:17 (GMT)
committerJason Evans <jasone@canonware.com>2012-04-05 20:36:17 (GMT)
commitb147611b5253921a873191bb0589d3b18f613946 (patch)
tree014ff40bb94fb4813eb17c19e2b1d7821bbae402 /configure.ac
parent02b231205e802a7c4f33899a569adcb1312a85d5 (diff)
downloadjemalloc-b147611b5253921a873191bb0589d3b18f613946.zip
jemalloc-b147611b5253921a873191bb0589d3b18f613946.tar.gz
jemalloc-b147611b5253921a873191bb0589d3b18f613946.tar.bz2
Add utrace(2)-based tracing (--enable-utrace).
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac29
1 files changed, 29 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 16f0378..8e94b5c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -699,6 +699,34 @@ if test "x$enable_fill" = "x1" ; then
fi
AC_SUBST([enable_fill])
+dnl Disable utrace(2)-based tracing by default.
+AC_ARG_ENABLE([utrace],
+ [AS_HELP_STRING([--enable-utrace], [Enable utrace(2)-based tracing])],
+[if test "x$enable_utrace" = "xno" ; then
+ enable_utrace="0"
+else
+ enable_utrace="1"
+fi
+],
+[enable_utrace="0"]
+)
+JE_COMPILABLE([utrace(2)], [
+#include <sys/types.h>
+#include <sys/param.h>
+#include <sys/time.h>
+#include <sys/uio.h>
+#include <sys/ktrace.h>
+], [
+ utrace((void *)0, 0);
+], [je_cv_utrace])
+if test "x${je_cv_utrace}" = "xno" ; then
+ enable_utrace="0"
+fi
+if test "x$enable_utrace" = "x1" ; then
+ AC_DEFINE([JEMALLOC_UTRACE], [ ])
+fi
+AC_SUBST([enable_utrace])
+
dnl Do not support the xmalloc option by default.
AC_ARG_ENABLE([xmalloc],
[AS_HELP_STRING([--enable-xmalloc], [Support xmalloc option])],
@@ -1061,6 +1089,7 @@ AC_MSG_RESULT([prof-gcc : ${enable_prof_gcc}])
AC_MSG_RESULT([tcache : ${enable_tcache}])
AC_MSG_RESULT([fill : ${enable_fill}])
AC_MSG_RESULT([xmalloc : ${enable_xmalloc}])
+AC_MSG_RESULT([utrace : ${enable_utrace}])
AC_MSG_RESULT([dss : ${enable_dss}])
AC_MSG_RESULT([lazy_lock : ${enable_lazy_lock}])
AC_MSG_RESULT([tls : ${enable_tls}])