summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAliaksey Kandratsenka <alk@tut.by>2014-04-12 12:38:19 -0700
committerAliaksey Kandratsenka <alk@tut.by>2014-04-12 18:05:37 -0700
commit125e5ed58b72550e6b74e0139c2c3dd5e262a6ec (patch)
treee59c23c3c6d497cb288c57ba09116ad2381d88c4
parent75b65f96b0bb44d70e0a461a03a3f8c928390283 (diff)
downloadgperftools-125e5ed58b72550e6b74e0139c2c3dd5e262a6ec.tar.gz
don't enable backtrace() for stacktrace capturing by default
Because we don't yet have a treatment for deadlocks that are caused by (recursive) use of malloc from within that facility.
-rw-r--r--configure.ac16
1 files changed, 12 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac
index bb81424..4e39a6b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -81,6 +81,11 @@ if test "$enable_minimal" = yes; then
enable_heap_profiler=no
enable_heap_checker=no
fi
+AC_ARG_ENABLE([stacktrace-via-backtrace],
+ [AS_HELP_STRING([--enable-stacktrace-via-backtrace],
+ [enable use of backtrace() for stacktrace capturing (may deadlock)])],
+ [enable_backtrace=yes],
+ [])
# Checks for programs.
@@ -394,8 +399,9 @@ case "$host" in
;;
esac
-AC_CHECK_DECLS([backtrace], [], [], [#include <execinfo.h>])
-
+if test "x$enable_backtrace" = xyes; then
+ AC_CHECK_DECLS([backtrace], [], [], [#include <execinfo.h>])
+fi
# For windows, this has a non-trivial value (__declspec(export)), but any
# system that uses configure wants this to be the empty string.
@@ -471,5 +477,7 @@ AC_CONFIG_FILES([Makefile
src/gperftools/tcmalloc.h src/windows/gperftools/tcmalloc.h])
AC_OUTPUT
-AS_IF([test "$x86_no_fp_by_default" = yes && test "x$enable_frame_pointers" != xyes && test "x$UNWIND_LIBS" = x],
- [AC_MSG_WARN([No frame pointers and no libunwind. Expect backtrace capturing and unittests to fail])])
+AS_IF([test "$x86_no_fp_by_default" = yes && test "x$enable_frame_pointers" != xyes && test "x$UNWIND_LIBS" = x && test "x$enable_minimal" != xyes],
+ [AS_IF([test "x$enable_backtrace" = xyes],
+ [AC_MSG_WARN([No frame pointers and no libunwind. Expect backtrace capturing and unittests to fail])],
+ [AC_MSG_FAILURE([No frame pointers and no libunwind. The compilation will fail])])])