diff options
author | Jason Evans <je@facebook.com> | 2010-02-11 02:15:53 (GMT) |
---|---|---|
committer | Jason Evans <je@facebook.com> | 2010-02-11 02:20:38 (GMT) |
commit | b27805b36309681da1936eb33044584547552340 (patch) | |
tree | bd9a85679a01af62405ab91af1c8c8992863c3ec /jemalloc/configure.ac | |
parent | 6109fe07a14b7a619365977d9523db9f8b333792 (diff) | |
download | jemalloc-b27805b36309681da1936eb33044584547552340.zip jemalloc-b27805b36309681da1936eb33044584547552340.tar.gz jemalloc-b27805b36309681da1936eb33044584547552340.tar.bz2 |
Various heap profiling improvements.
Add the --disable-prof-libgcc configure option, and add backtracing
based on libgcc, which is used by default.
Fix a bug in hash().
Fix various configuration-dependent compilation errors.
Diffstat (limited to 'jemalloc/configure.ac')
-rw-r--r-- | jemalloc/configure.ac | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/jemalloc/configure.ac b/jemalloc/configure.ac index 1c4e335..17c7aa6 100644 --- a/jemalloc/configure.ac +++ b/jemalloc/configure.ac @@ -373,6 +373,17 @@ fi ], [enable_prof="0"] ) +AC_ARG_ENABLE([prof-libgcc], + [AS_HELP_STRING([--disable-prof-libgcc], + [Do not use libgcc for backtracing])], +[if test "x$enable_prof_libgcc" = "xno" ; then + enable_prof_libgcc="0" +else + enable_prof_libgcc="1" +fi +], +[enable_prof_libgcc="1"] +) AC_ARG_ENABLE([prof-libunwind], [AS_HELP_STRING([--enable-prof-libunwind], [Use libunwind for backtracing])], [if test "x$enable_prof_libunwind" = "xno" ; then @@ -682,6 +693,18 @@ else fi AC_SUBST([roff_prof]) +dnl If libunwind isn't enabled, try to use libgcc rather than gcc intrinsics +dnl for backtracing. +if test "x$enable_prof" = "x1" -a "x$enable_prof_libunwind" = "x0" \ + -a "x$GCC" = "xyes" -a "x$enable_prof_libgcc" = "x1" ; then + enable_prof_libgcc="1" + AC_CHECK_HEADERS([unwind.h], , [enable_prof_libgcc="0"]) + AC_CHECK_LIB([gcc], [_Unwind_Backtrace], [LIBS="$LIBS -lgcc"], [enable_prof_libgcc="0"]) + if test "x${enable_prof_libgcc}" = "x1" ; then + AC_DEFINE([JEMALLOC_PROF_LIBGCC], [ ]) + fi +fi + dnl ============================================================================ dnl Configure libgd for mtrgraph. bins="${objroot}bin/jemtr2mtr${install_suffix}" |