gperftools/gperftools-svn-r190.patch

8017 lines
313 KiB
Diff
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

diff -urP gperftools-2.0/aclocal.m4 /home/spot/gperftools/aclocal.m4
--- gperftools-2.0/aclocal.m4 2012-02-03 14:39:04.000000000 -0500
+++ /home/spot/gperftools/aclocal.m4 2013-03-01 14:25:39.165366808 -0500
@@ -1,7 +1,7 @@
-# generated automatically by aclocal 1.10.1 -*- Autoconf -*-
+# generated automatically by aclocal 1.10.3 -*- Autoconf -*-
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -13,13 +13,112 @@
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
-m4_if(AC_AUTOCONF_VERSION, [2.65],,
-[m4_warning([this file was generated for autoconf 2.65.
+m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
+[m4_warning([this file was generated for autoconf 2.68.
You have another version of autoconf. It may work, but is not guaranteed to.
If you have problems, you may need to regenerate the build system entirely.
To do so, use the procedure documented by the package, typically `autoreconf'.])])
-# Copyright (C) 2002, 2003, 2005, 2006, 2007 Free Software Foundation, Inc.
+# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
+#
+# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
+# Written by Scott James Remnant, 2004.
+#
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+
+# serial 5 lt~obsolete.m4
+
+# These exist entirely to fool aclocal when bootstrapping libtool.
+#
+# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
+# which have later been changed to m4_define as they aren't part of the
+# exported API, or moved to Autoconf or Automake where they belong.
+#
+# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN
+# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
+# using a macro with the same name in our local m4/libtool.m4 it'll
+# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
+# and doesn't know about Autoconf macros at all.)
+#
+# So we provide this file, which has a silly filename so it's always
+# included after everything else. This provides aclocal with the
+# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
+# because those macros already exist, or will be overwritten later.
+# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
+#
+# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
+# Yes, that means every name once taken will need to remain here until
+# we give up compatibility with versions before 1.7, at which point
+# we need to keep only those names which we still refer to.
+
+# This is to help aclocal find these macros, as it can't see m4_define.
+AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
+
+m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
+m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])])
+m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
+m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])])
+m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
+m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])])
+m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])])
+m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
+m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])])
+m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])])
+m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])])
+m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
+m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
+m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
+m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
+m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
+m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])])
+m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
+m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
+m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])])
+m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])])
+m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
+m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
+m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
+m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
+m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
+m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
+m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
+m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])])
+m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])])
+m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])])
+m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
+m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
+m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])])
+m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])])
+m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
+m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
+m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])])
+m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
+m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])])
+m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])])
+m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])])
+m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
+m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
+m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
+m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
+m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
+m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
+m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
+m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
+m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
+m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
+m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])])
+m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
+m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
+m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])])
+m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
+m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
+m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])])
+m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])])
+m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])])
+
+# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -34,7 +133,7 @@
[am__api_version='1.10'
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
dnl require some minimum version. Point them to the right macro.
-m4_if([$1], [1.10.1], [],
+m4_if([$1], [1.10.3], [],
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
])
@@ -48,12 +147,12 @@
# AM_SET_CURRENT_AUTOMAKE_VERSION
# -------------------------------
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
-# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
+# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-[AM_AUTOMAKE_VERSION([1.10.1])dnl
+[AM_AUTOMAKE_VERSION([1.10.3])dnl
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
-_AM_AUTOCONF_VERSION(AC_AUTOCONF_VERSION)])
+_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
@@ -143,14 +242,14 @@
Usually this means the macro was only invoked conditionally.]])
fi])])
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
# Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 9
+# serial 10
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
# written in clear, in which case automake, when reading aclocal.m4,
@@ -207,6 +306,16 @@
if test "$am_compiler_list" = ""; then
am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
fi
+ am__universal=false
+ m4_case([$1], [CC],
+ [case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac],
+ [CXX],
+ [case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac])
+
for depmode in $am_compiler_list; do
# Setup a source with many dependencies, because some compilers
# like to wrap large dependency lists on column 80 (with \), and
@@ -224,7 +333,17 @@
done
echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+ # We check with `-c' and `-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle `-M -o', and we need to detect this. Also, some Intel
+ # versions had trouble with output in subdirs
+ am__obj=sub/conftest.${OBJEXT-o}
+ am__minus_obj="-o $am__obj"
case $depmode in
+ gcc)
+ # This depmode causes a compiler race in universal mode.
+ test "$am__universal" = false || continue
+ ;;
nosideeffect)
# after this tag, mechanisms are not by side-effect, so they'll
# only be used when explicitly requested
@@ -234,19 +353,23 @@
break
fi
;;
+ msvisualcpp | msvcmsys)
+ # This compiler won't grok `-c -o', but also, the minuso test has
+ # not run yet. These depmodes are late enough in the game, and
+ # so weak that their functioning should not be impacted.
+ am__obj=conftest.${OBJEXT-o}
+ am__minus_obj=
+ ;;
none) break ;;
esac
- # We check with `-c' and `-o' for the sake of the "dashmstdout"
- # mode. It turns out that the SunPro C++ compiler does not properly
- # handle `-M -o', and we need to detect this.
if depmode=$depmode \
- source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+ source=sub/conftest.c object=$am__obj \
depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
- $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
>/dev/null 2>conftest.err &&
grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
- grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
+ grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
# icc doesn't choke on unknown options, it will just issue warnings
# or remarks (even with -Werror). So we grep stderr for any message
@@ -303,57 +426,68 @@
# Generate code to set up dependency tracking. -*- Autoconf -*-
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
# Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-#serial 3
+#serial 5
# _AM_OUTPUT_DEPENDENCY_COMMANDS
# ------------------------------
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
-[for mf in $CONFIG_FILES; do
- # Strip MF so we end up with the name of the file.
- mf=`echo "$mf" | sed -e 's/:.*$//'`
- # Check whether this is an Automake generated Makefile or not.
- # We used to match only the files named `Makefile.in', but
- # some people rename them; so instead we look at the file content.
- # Grep'ing the first line is not enough: some people post-process
- # each Makefile.in and add a new line on top of each file to say so.
- # Grep'ing the whole file is not good either: AIX grep has a line
- # limit of 2048, but all sed's we know have understand at least 4000.
- if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
- dirpart=`AS_DIRNAME("$mf")`
- else
- continue
- fi
- # Extract the definition of DEPDIR, am__include, and am__quote
- # from the Makefile without running `make'.
- DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
- test -z "$DEPDIR" && continue
- am__include=`sed -n 's/^am__include = //p' < "$mf"`
- test -z "am__include" && continue
- am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
- # When using ansi2knr, U may be empty or an underscore; expand it
- U=`sed -n 's/^U = //p' < "$mf"`
- # Find all dependency output files, they are included files with
- # $(DEPDIR) in their names. We invoke sed twice because it is the
- # simplest approach to changing $(DEPDIR) to its actual value in the
- # expansion.
- for file in `sed -n "
- s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
- sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
- # Make sure the directory exists.
- test -f "$dirpart/$file" && continue
- fdir=`AS_DIRNAME(["$file"])`
- AS_MKDIR_P([$dirpart/$fdir])
- # echo "creating $dirpart/$file"
- echo '# dummy' > "$dirpart/$file"
+[{
+ # Autoconf 2.62 quotes --file arguments for eval, but not when files
+ # are listed without --file. Let's play safe and only enable the eval
+ # if we detect the quoting.
+ case $CONFIG_FILES in
+ *\'*) eval set x "$CONFIG_FILES" ;;
+ *) set x $CONFIG_FILES ;;
+ esac
+ shift
+ for mf
+ do
+ # Strip MF so we end up with the name of the file.
+ mf=`echo "$mf" | sed -e 's/:.*$//'`
+ # Check whether this is an Automake generated Makefile or not.
+ # We used to match only the files named `Makefile.in', but
+ # some people rename them; so instead we look at the file content.
+ # Grep'ing the first line is not enough: some people post-process
+ # each Makefile.in and add a new line on top of each file to say so.
+ # Grep'ing the whole file is not good either: AIX grep has a line
+ # limit of 2048, but all sed's we know have understand at least 4000.
+ if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+ dirpart=`AS_DIRNAME("$mf")`
+ else
+ continue
+ fi
+ # Extract the definition of DEPDIR, am__include, and am__quote
+ # from the Makefile without running `make'.
+ DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+ test -z "$DEPDIR" && continue
+ am__include=`sed -n 's/^am__include = //p' < "$mf"`
+ test -z "am__include" && continue
+ am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+ # When using ansi2knr, U may be empty or an underscore; expand it
+ U=`sed -n 's/^U = //p' < "$mf"`
+ # Find all dependency output files, they are included files with
+ # $(DEPDIR) in their names. We invoke sed twice because it is the
+ # simplest approach to changing $(DEPDIR) to its actual value in the
+ # expansion.
+ for file in `sed -n "
+ s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+ # Make sure the directory exists.
+ test -f "$dirpart/$file" && continue
+ fdir=`AS_DIRNAME(["$file"])`
+ AS_MKDIR_P([$dirpart/$fdir])
+ # echo "creating $dirpart/$file"
+ echo '# dummy' > "$dirpart/$file"
+ done
done
-done
+}
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
@@ -370,22 +504,10 @@
[AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
])
-# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 8
-
-# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS.
-AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
-
# Do all the work for Automake. -*- Autoconf -*-
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006, 2008 Free Software Foundation, Inc.
+# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -459,8 +581,8 @@
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
AM_MISSING_PROG(AUTOHEADER, autoheader)
AM_MISSING_PROG(MAKEINFO, makeinfo)
-AM_PROG_INSTALL_SH
-AM_PROG_INSTALL_STRIP
+AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
AC_REQUIRE([AM_PROG_MKDIR_P])dnl
# We need awk for the "check" target. The system "awk" is bad on
# some platforms.
@@ -595,14 +717,14 @@
rm -f confinc confmf
])
-# Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005
+# Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2008
# Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 5
+# serial 6
# AM_PROG_CC_C_O
# --------------
@@ -614,8 +736,9 @@
# FIXME: we rely on the cache variable name because
# there is no other way.
set dummy $CC
-ac_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
-if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" != yes"; then
+am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
+eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
+if test "$am_t" != yes; then
# Losing compiler, so override with the script.
# FIXME: It is wrong to rewrite CC.
# But if we don't then we get into trouble of one sort or another.
@@ -693,13 +816,13 @@
# Helper functions for option handling. -*- Autoconf -*-
-# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 3
+# serial 4
# _AM_MANGLE_OPTION(NAME)
# -----------------------
@@ -716,7 +839,7 @@
# ----------------------------------
# OPTIONS is a space-separated list of Automake options.
AC_DEFUN([_AM_SET_OPTIONS],
-[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
+[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
# -------------------------------------------
diff -urP gperftools-2.0/autogen.sh /home/spot/gperftools/autogen.sh
--- gperftools-2.0/autogen.sh 1969-12-31 19:00:00.000000000 -0500
+++ /home/spot/gperftools/autogen.sh 2013-03-01 14:25:39.164366808 -0500
@@ -0,0 +1,54 @@
+#!/bin/sh
+
+# Before using, you should figure out all the .m4 macros that your
+# configure.m4 script needs and make sure they exist in the m4/
+# directory.
+#
+# These are the files that this script might edit:
+# aclocal.m4 configure Makefile.in src/config.h.in \
+# depcomp config.guess config.sub install-sh missing mkinstalldirs \
+# ltmain.sh
+#
+# Here's a command you can run to see what files aclocal will import:
+# aclocal -I ../autoconf --output=- | sed -n 's/^m4_include..\([^]]*\).*/\1/p'
+
+set -ex
+rm -rf autom4te.cache
+
+trap 'rm -f aclocal.m4.tmp' EXIT
+
+# Returns the first binary in $* that exists, or the last arg, if none exists.
+WhichOf() {
+ for candidate in "$@"; do
+ if "$candidate" --version >/dev/null 2>&1; then
+ echo "$candidate"
+ return
+ fi
+ done
+ echo "$candidate" # the last one in $@
+}
+
+# Use version 1.9 of aclocal and automake if available.
+ACLOCAL=`WhichOf aclocal-1.9 aclocal`
+AUTOMAKE=`WhichOf automake-1.9 automake`
+LIBTOOLIZE=`WhichOf glibtoolize libtoolize15 libtoolize14 libtoolize`
+
+# aclocal tries to overwrite aclocal.m4 even if the contents haven't
+# changed, which is annoying when the file is not open for edit (in
+# p4). We work around this by writing to a temp file and just
+# updating the timestamp if the file hasn't change.
+"$ACLOCAL" --force -I m4 --output=aclocal.m4.tmp
+if cmp aclocal.m4.tmp aclocal.m4; then
+ touch aclocal.m4 # pretend that we regenerated the file
+ rm -f aclocal.m4.tmp
+else
+ mv aclocal.m4.tmp aclocal.m4 # we did set -e above, so we die if this fails
+fi
+
+grep -q '^[^#]*AC_PROG_LIBTOOL' configure.ac && "$LIBTOOLIZE" -c -f
+autoconf -f -W all,no-obsolete
+autoheader -f -W all
+"$AUTOMAKE" -a -c -f -W all
+
+rm -rf autom4te.cache
+exit 0
diff -urP gperftools-2.0/configure /home/spot/gperftools/configure
--- gperftools-2.0/configure 2012-02-03 14:39:06.000000000 -0500
+++ /home/spot/gperftools/configure 2013-03-01 14:25:37.963366851 -0500
@@ -1,13 +1,13 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.65 for gperftools 2.0.
+# Generated by GNU Autoconf 2.68 for gperftools 2.0.
#
# Report bugs to <google-perftools@googlegroups.com>.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
-# Inc.
+# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
+# Foundation, Inc.
#
#
# This configure script is free software; the Free Software Foundation
@@ -91,6 +91,7 @@
IFS=" "" $as_nl"
# Find who we are. Look in the path if we contain no directory separator.
+as_myself=
case $0 in #((
*[\\/]* ) as_myself=$0 ;;
*) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -216,11 +217,18 @@
# We cannot yet assume a decent shell, so we have to provide a
# neutralization value for shells without unset; and this also
# works around shells that cannot unset nonexistent variables.
+ # Preserve -v and -x to the replacement shell.
BASH_ENV=/dev/null
ENV=/dev/null
(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
export CONFIG_SHELL
- exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
+ case $- in # ((((
+ *v*x* | *x*v* ) as_opts=-vx ;;
+ *v* ) as_opts=-v ;;
+ *x* ) as_opts=-x ;;
+ * ) as_opts= ;;
+ esac
+ exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
fi
if test x$as_have_required = xno; then :
@@ -319,7 +327,7 @@
test -d "$as_dir" && break
done
test -z "$as_dirs" || eval "mkdir $as_dirs"
- } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
+ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
} # as_fn_mkdir_p
@@ -359,19 +367,19 @@
fi # as_fn_arith
-# as_fn_error ERROR [LINENO LOG_FD]
-# ---------------------------------
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
-# script with status $?, using 1 if that was 0.
+# script with STATUS, using 1 if that was 0.
as_fn_error ()
{
- as_status=$?; test $as_status -eq 0 && as_status=1
- if test "$3"; then
- as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
+ as_status=$1; test $as_status -eq 0 && as_status=1
+ if test "$4"; then
+ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
fi
- $as_echo "$as_me: error: $1" >&2
+ $as_echo "$as_me: error: $2" >&2
as_fn_exit $as_status
} # as_fn_error
@@ -682,7 +690,7 @@
exec 6>&1
# Name of the host.
-# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
+# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
# so uname gets run too.
ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
@@ -997,8 +1005,9 @@
fi
case $ac_option in
- *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
- *) ac_optarg=yes ;;
+ *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+ *=) ac_optarg= ;;
+ *) ac_optarg=yes ;;
esac
# Accept the important Cygnus configure options, so we can diagnose typos.
@@ -1043,7 +1052,7 @@
ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
# Reject names that are not valid shell variable names.
expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- as_fn_error "invalid feature name: $ac_useropt"
+ as_fn_error $? "invalid feature name: $ac_useropt"
ac_useropt_orig=$ac_useropt
ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
case $ac_user_opts in
@@ -1069,7 +1078,7 @@
ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
# Reject names that are not valid shell variable names.
expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- as_fn_error "invalid feature name: $ac_useropt"
+ as_fn_error $? "invalid feature name: $ac_useropt"
ac_useropt_orig=$ac_useropt
ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
case $ac_user_opts in
@@ -1273,7 +1282,7 @@
ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
# Reject names that are not valid shell variable names.
expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- as_fn_error "invalid package name: $ac_useropt"
+ as_fn_error $? "invalid package name: $ac_useropt"
ac_useropt_orig=$ac_useropt
ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
case $ac_user_opts in
@@ -1289,7 +1298,7 @@
ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
# Reject names that are not valid shell variable names.
expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- as_fn_error "invalid package name: $ac_useropt"
+ as_fn_error $? "invalid package name: $ac_useropt"
ac_useropt_orig=$ac_useropt
ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
case $ac_user_opts in
@@ -1319,8 +1328,8 @@
| --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
x_libraries=$ac_optarg ;;
- -*) as_fn_error "unrecognized option: \`$ac_option'
-Try \`$0 --help' for more information."
+ -*) as_fn_error $? "unrecognized option: \`$ac_option'
+Try \`$0 --help' for more information"
;;
*=*)
@@ -1328,7 +1337,7 @@
# Reject names that are not valid shell variable names.
case $ac_envvar in #(
'' | [0-9]* | *[!_$as_cr_alnum]* )
- as_fn_error "invalid variable name: \`$ac_envvar'" ;;
+ as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
esac
eval $ac_envvar=\$ac_optarg
export $ac_envvar ;;
@@ -1338,7 +1347,7 @@
$as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
$as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
- : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
+ : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
;;
esac
@@ -1346,13 +1355,13 @@
if test -n "$ac_prev"; then
ac_option=--`echo $ac_prev | sed 's/_/-/g'`
- as_fn_error "missing argument to $ac_option"
+ as_fn_error $? "missing argument to $ac_option"
fi
if test -n "$ac_unrecognized_opts"; then
case $enable_option_checking in
no) ;;
- fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
+ fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
*) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
esac
fi
@@ -1375,7 +1384,7 @@
[\\/$]* | ?:[\\/]* ) continue;;
NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
esac
- as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
+ as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
done
# There might be people who depend on the old broken behavior: `$host'
@@ -1389,8 +1398,8 @@
if test "x$host_alias" != x; then
if test "x$build_alias" = x; then
cross_compiling=maybe
- $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
- If a cross compiler is detected then cross compile mode will be used." >&2
+ $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
+ If a cross compiler is detected then cross compile mode will be used" >&2
elif test "x$build_alias" != "x$host_alias"; then
cross_compiling=yes
fi
@@ -1405,9 +1414,9 @@
ac_pwd=`pwd` && test -n "$ac_pwd" &&
ac_ls_di=`ls -di .` &&
ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
- as_fn_error "working directory cannot be determined"
+ as_fn_error $? "working directory cannot be determined"
test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
- as_fn_error "pwd does not report name of working directory"
+ as_fn_error $? "pwd does not report name of working directory"
# Find the source files, if location was not specified.
@@ -1446,11 +1455,11 @@
fi
if test ! -r "$srcdir/$ac_unique_file"; then
test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
- as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
+ as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
fi
ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
ac_abs_confdir=`(
- cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
+ cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
pwd)`
# When building in place, set srcdir=.
if test "$ac_abs_confdir" = "$ac_pwd"; then
@@ -1490,7 +1499,7 @@
--help=short display options specific to this package
--help=recursive display the short help of all the included packages
-V, --version display version information and exit
- -q, --quiet, --silent do not print \`checking...' messages
+ -q, --quiet, --silent do not print \`checking ...' messages
--cache-file=FILE cache test results in FILE [disabled]
-C, --config-cache alias for \`--cache-file=config.cache'
-n, --no-create do not create output files
@@ -1657,9 +1666,9 @@
if $ac_init_version; then
cat <<\_ACEOF
gperftools configure 2.0
-generated by GNU Autoconf 2.65
+generated by GNU Autoconf 2.68
-Copyright (C) 2009 Free Software Foundation, Inc.
+Copyright (C) 2010 Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.
_ACEOF
@@ -1703,7 +1712,7 @@
ac_retval=1
fi
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
as_fn_set_status $ac_retval
} # ac_fn_cxx_try_compile
@@ -1741,7 +1750,7 @@
ac_retval=1
fi
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
as_fn_set_status $ac_retval
} # ac_fn_c_try_compile
@@ -1767,7 +1776,7 @@
mv -f conftest.er1 conftest.err
fi
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } >/dev/null && {
+ test $ac_status = 0; } > conftest.i && {
test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
test ! -s conftest.err
}; then :
@@ -1778,7 +1787,7 @@
ac_retval=1
fi
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
as_fn_set_status $ac_retval
} # ac_fn_c_try_cpp
@@ -1824,7 +1833,7 @@
# interfere with the next link command; also delete a directory that is
# left behind by Apple's compiler. We do this before executing the actions.
rm -rf conftest.dSYM conftest_ipa8_conftest.oo
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
as_fn_set_status $ac_retval
} # ac_fn_c_try_link
@@ -1838,7 +1847,7 @@
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
$as_echo_n "checking for $2... " >&6; }
-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval \${$3+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -1856,7 +1865,7 @@
eval ac_res=\$$3
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
} # ac_fn_c_check_header_compile
@@ -1897,7 +1906,7 @@
ac_retval=$ac_status
fi
rm -rf conftest.dSYM conftest_ipa8_conftest.oo
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
as_fn_set_status $ac_retval
} # ac_fn_c_try_run
@@ -1910,7 +1919,7 @@
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
$as_echo_n "checking for $2... " >&6; }
-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval \${$3+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -1965,7 +1974,7 @@
eval ac_res=\$$3
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
} # ac_fn_c_check_func
@@ -1990,7 +1999,7 @@
mv -f conftest.er1 conftest.err
fi
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } >/dev/null && {
+ test $ac_status = 0; } > conftest.i && {
test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
test ! -s conftest.err
}; then :
@@ -2001,7 +2010,7 @@
ac_retval=1
fi
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
as_fn_set_status $ac_retval
} # ac_fn_cxx_try_cpp
@@ -2047,7 +2056,7 @@
# interfere with the next link command; also delete a directory that is
# left behind by Apple's compiler. We do this before executing the actions.
rm -rf conftest.dSYM conftest_ipa8_conftest.oo
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
as_fn_set_status $ac_retval
} # ac_fn_cxx_try_link
@@ -2061,7 +2070,7 @@
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
$as_echo_n "checking for $2... " >&6; }
-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval \${$3+:} false; then :
$as_echo_n "(cached) " >&6
else
eval "$3=no"
@@ -2102,7 +2111,7 @@
eval ac_res=\$$3
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
} # ac_fn_c_check_type
@@ -2114,10 +2123,10 @@
ac_fn_c_check_header_mongrel ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+ if eval \${$3+:} false; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
$as_echo_n "checking for $2... " >&6; }
-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval \${$3+:} false; then :
$as_echo_n "(cached) " >&6
fi
eval ac_res=\$$3
@@ -2153,7 +2162,7 @@
else
ac_header_preproc=no
fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
$as_echo "$ac_header_preproc" >&6; }
@@ -2176,17 +2185,15 @@
$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
-( cat <<\_ASBOX
-## ------------------------------------------------ ##
+( $as_echo "## ------------------------------------------------ ##
## Report this to google-perftools@googlegroups.com ##
-## ------------------------------------------------ ##
-_ASBOX
+## ------------------------------------------------ ##"
) | sed "s/^/$as_me: WARNING: /" >&2
;;
esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
$as_echo_n "checking for $2... " >&6; }
-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval \${$3+:} false; then :
$as_echo_n "(cached) " >&6
else
eval "$3=\$ac_header_compiler"
@@ -2195,19 +2202,22 @@
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
fi
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
} # ac_fn_c_check_header_mongrel
-# ac_fn_c_check_decl LINENO SYMBOL VAR
-# ------------------------------------
-# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
+# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
+# ---------------------------------------------
+# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
+# accordingly.
ac_fn_c_check_decl ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5
-$as_echo_n "checking whether $2 is declared... " >&6; }
-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+ as_decl_name=`echo $2|sed 's/ *(.*//'`
+ as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
+$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
+if eval \${$3+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -2216,8 +2226,12 @@
int
main ()
{
-#ifndef $2
- (void) $2;
+#ifndef $as_decl_name
+#ifdef __cplusplus
+ (void) $as_decl_use;
+#else
+ (void) $as_decl_name;
+#endif
#endif
;
@@ -2234,7 +2248,7 @@
eval ac_res=\$$3
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
} # ac_fn_c_check_decl
cat >config.log <<_ACEOF
@@ -2242,7 +2256,7 @@
running configure, to aid debugging if configure makes a mistake.
It was created by gperftools $as_me 2.0, which was
-generated by GNU Autoconf 2.65. Invocation command line was
+generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2352,11 +2366,9 @@
{
echo
- cat <<\_ASBOX
-## ---------------- ##
+ $as_echo "## ---------------- ##
## Cache variables. ##
-## ---------------- ##
-_ASBOX
+## ---------------- ##"
echo
# The following way of writing the cache mishandles newlines in values,
(
@@ -2390,11 +2402,9 @@
)
echo
- cat <<\_ASBOX
-## ----------------- ##
+ $as_echo "## ----------------- ##
## Output variables. ##
-## ----------------- ##
-_ASBOX
+## ----------------- ##"
echo
for ac_var in $ac_subst_vars
do
@@ -2407,11 +2417,9 @@
echo
if test -n "$ac_subst_files"; then
- cat <<\_ASBOX
-## ------------------- ##
+ $as_echo "## ------------------- ##
## File substitutions. ##
-## ------------------- ##
-_ASBOX
+## ------------------- ##"
echo
for ac_var in $ac_subst_files
do
@@ -2425,11 +2433,9 @@
fi
if test -s confdefs.h; then
- cat <<\_ASBOX
-## ----------- ##
+ $as_echo "## ----------- ##
## confdefs.h. ##
-## ----------- ##
-_ASBOX
+## ----------- ##"
echo
cat confdefs.h
echo
@@ -2484,7 +2490,12 @@
ac_site_file1=NONE
ac_site_file2=NONE
if test -n "$CONFIG_SITE"; then
- ac_site_file1=$CONFIG_SITE
+ # We do not want a PATH search for config.site.
+ case $CONFIG_SITE in #((
+ -*) ac_site_file1=./$CONFIG_SITE;;
+ */*) ac_site_file1=$CONFIG_SITE;;
+ *) ac_site_file1=./$CONFIG_SITE;;
+ esac
elif test "x$prefix" != xNONE; then
ac_site_file1=$prefix/share/config.site
ac_site_file2=$prefix/etc/config.site
@@ -2499,7 +2510,11 @@
{ $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
$as_echo "$as_me: loading site script $ac_site_file" >&6;}
sed 's/^/| /' "$ac_site_file" >&5
- . "$ac_site_file"
+ . "$ac_site_file" \
+ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "failed to load site script $ac_site_file
+See \`config.log' for more details" "$LINENO" 5; }
fi
done
@@ -2578,7 +2593,7 @@
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
- as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
+ as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
fi
## -------------------- ##
## Main body of script. ##
@@ -2605,16 +2620,22 @@
ac_aux_dir=
for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
- for ac_t in install-sh install.sh shtool; do
- if test -f "$ac_dir/$ac_t"; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/$ac_t -c"
- break 2
- fi
- done
+ if test -f "$ac_dir/install-sh"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install-sh -c"
+ break
+ elif test -f "$ac_dir/install.sh"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install.sh -c"
+ break
+ elif test -f "$ac_dir/shtool"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/shtool install -c"
+ break
+ fi
done
if test -z "$ac_aux_dir"; then
- as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
+ as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
fi
# These three variables are undocumented and unsupported,
@@ -2628,27 +2649,27 @@
# Make sure we can run config.sub.
$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
- as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
+ as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
$as_echo_n "checking build system type... " >&6; }
-if test "${ac_cv_build+set}" = set; then :
+if ${ac_cv_build+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_build_alias=$build_alias
test "x$ac_build_alias" = x &&
ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
test "x$ac_build_alias" = x &&
- as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
+ as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
- as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
+ as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
$as_echo "$ac_cv_build" >&6; }
case $ac_cv_build in
*-*-*) ;;
-*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
+*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
esac
build=$ac_cv_build
ac_save_IFS=$IFS; IFS='-'
@@ -2666,14 +2687,14 @@
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
$as_echo_n "checking host system type... " >&6; }
-if test "${ac_cv_host+set}" = set; then :
+if ${ac_cv_host+:} false; then :
$as_echo_n "(cached) " >&6
else
if test "x$host_alias" = x; then
ac_cv_host=$ac_cv_build
else
ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
- as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
+ as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
fi
fi
@@ -2681,7 +2702,7 @@
$as_echo "$ac_cv_host" >&6; }
case $ac_cv_host in
*-*-*) ;;
-*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
+*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
esac
host=$ac_cv_host
ac_save_IFS=$IFS; IFS='-'
@@ -2716,7 +2737,7 @@
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
$as_echo_n "checking for a BSD-compatible install... " >&6; }
if test -z "$INSTALL"; then
-if test "${ac_cv_path_install+set}" = set; then :
+if ${ac_cv_path_install+:} false; then :
$as_echo_n "(cached) " >&6
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -2816,7 +2837,7 @@
# if, for instance, CONFIG_SHELL is bash and it inherits a
# broken ls alias from the environment. This has actually
# happened. Such a system could not be considered "sane".
- as_fn_error "ls -t appears to fail. Make sure there is not a broken
+ as_fn_error $? "ls -t appears to fail. Make sure there is not a broken
alias in your environment" "$LINENO" 5
fi
@@ -2826,7 +2847,7 @@
# Ok.
:
else
- as_fn_error "newly created file is older than distributed files!
+ as_fn_error $? "newly created file is older than distributed files!
Check your system clock" "$LINENO" 5
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
@@ -2854,10 +2875,112 @@
$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
fi
+install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
+
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'. However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+if test "$cross_compiling" != no; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_STRIP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$STRIP"; then
+ ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
+$as_echo "$STRIP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+ ac_ct_STRIP=$STRIP
+ # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_STRIP"; then
+ ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_STRIP="strip"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
+$as_echo "$ac_ct_STRIP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_STRIP" = x; then
+ STRIP=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ STRIP=$ac_ct_STRIP
+ fi
+else
+ STRIP="$ac_cv_prog_STRIP"
+fi
+
+fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
if test -z "$MKDIR_P"; then
- if test "${ac_cv_path_mkdir+set}" = set; then :
+ if ${ac_cv_path_mkdir+:} false; then :
$as_echo_n "(cached) " >&6
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -2908,7 +3031,7 @@
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_AWK+set}" = set; then :
+if ${ac_cv_prog_AWK+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$AWK"; then
@@ -2948,7 +3071,7 @@
$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
set x ${MAKE-make}
ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
-if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
$as_echo_n "(cached) " >&6
else
cat >conftest.make <<\_ACEOF
@@ -2956,7 +3079,7 @@
all:
@echo '@@@%%%=$(MAKE)=@@@%%%'
_ACEOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
case `${MAKE-make} -f conftest.make 2>/dev/null` in
*@@@%%%=?*=@@@%%%*)
eval ac_cv_prog_make_${ac_make}_set=yes;;
@@ -2990,7 +3113,7 @@
am__isrc=' -I$(srcdir)'
# test to see if srcdir already configured
if test -f $srcdir/config.status; then
- as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
+ as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
fi
fi
@@ -3034,108 +3157,6 @@
MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
-install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
-
-# Installed binaries are usually stripped using `strip' when the user
-# run `make install-strip'. However `strip' might not be the right
-# tool to use in cross-compilation environments, therefore Automake
-# will honor the `STRIP' environment variable to overrule this program.
-if test "$cross_compiling" != no; then
- if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
-set dummy ${ac_tool_prefix}strip; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_STRIP+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$STRIP"; then
- ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_STRIP="${ac_tool_prefix}strip"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-STRIP=$ac_cv_prog_STRIP
-if test -n "$STRIP"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
-$as_echo "$STRIP" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_STRIP"; then
- ac_ct_STRIP=$STRIP
- # Extract the first word of "strip", so it can be a program name with args.
-set dummy strip; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$ac_ct_STRIP"; then
- ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_ac_ct_STRIP="strip"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
-if test -n "$ac_ct_STRIP"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
-$as_echo "$ac_ct_STRIP" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
- if test "x$ac_ct_STRIP" = x; then
- STRIP=":"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
- STRIP=$ac_ct_STRIP
- fi
-else
- STRIP="$ac_cv_prog_STRIP"
-fi
-
-fi
-INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
-
# We need awk for the "check" target. The system "awk" is bad on
# some platforms.
# Always define AMTAR for backward compatibility.
@@ -3238,7 +3259,7 @@
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CXX+set}" = set; then :
+if ${ac_cv_prog_CXX+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$CXX"; then
@@ -3282,7 +3303,7 @@
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then :
+if ${ac_cv_prog_ac_ct_CXX+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_CXX"; then
@@ -3445,9 +3466,8 @@
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ as_fn_set_status 77
-as_fn_error "C++ compiler cannot create executables
-See \`config.log' for more details." "$LINENO" 5; }; }
+as_fn_error 77 "C++ compiler cannot create executables
+See \`config.log' for more details" "$LINENO" 5; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
@@ -3489,8 +3509,8 @@
else
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details." "$LINENO" 5; }
+as_fn_error $? "cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details" "$LINENO" 5; }
fi
rm -f conftest conftest$ac_cv_exeext
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
@@ -3547,9 +3567,9 @@
else
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "cannot run C++ compiled programs.
+as_fn_error $? "cannot run C++ compiled programs.
If you meant to cross compile, use \`--host'.
-See \`config.log' for more details." "$LINENO" 5; }
+See \`config.log' for more details" "$LINENO" 5; }
fi
fi
fi
@@ -3560,7 +3580,7 @@
ac_clean_files=$ac_clean_files_save
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
$as_echo_n "checking for suffix of object files... " >&6; }
-if test "${ac_cv_objext+set}" = set; then :
+if ${ac_cv_objext+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -3600,8 +3620,8 @@
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "cannot compute suffix of object files: cannot compile
-See \`config.log' for more details." "$LINENO" 5; }
+as_fn_error $? "cannot compute suffix of object files: cannot compile
+See \`config.log' for more details" "$LINENO" 5; }
fi
rm -f conftest.$ac_cv_objext conftest.$ac_ext
fi
@@ -3611,7 +3631,7 @@
ac_objext=$OBJEXT
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
-if test "${ac_cv_cxx_compiler_gnu+set}" = set; then :
+if ${ac_cv_cxx_compiler_gnu+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -3648,7 +3668,7 @@
ac_save_CXXFLAGS=$CXXFLAGS
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
$as_echo_n "checking whether $CXX accepts -g... " >&6; }
-if test "${ac_cv_prog_cxx_g+set}" = set; then :
+if ${ac_cv_prog_cxx_g+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_save_cxx_werror_flag=$ac_cxx_werror_flag
@@ -3796,7 +3816,7 @@
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
$as_echo_n "checking dependency style of $depcc... " >&6; }
-if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then :
+if ${am_cv_CXX_dependencies_compiler_type+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
@@ -3822,6 +3842,11 @@
if test "$am_compiler_list" = ""; then
am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
fi
+ am__universal=false
+ case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac
+
for depmode in $am_compiler_list; do
# Setup a source with many dependencies, because some compilers
# like to wrap large dependency lists on column 80 (with \), and
@@ -3839,7 +3864,17 @@
done
echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+ # We check with `-c' and `-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle `-M -o', and we need to detect this. Also, some Intel
+ # versions had trouble with output in subdirs
+ am__obj=sub/conftest.${OBJEXT-o}
+ am__minus_obj="-o $am__obj"
case $depmode in
+ gcc)
+ # This depmode causes a compiler race in universal mode.
+ test "$am__universal" = false || continue
+ ;;
nosideeffect)
# after this tag, mechanisms are not by side-effect, so they'll
# only be used when explicitly requested
@@ -3849,19 +3884,23 @@
break
fi
;;
+ msvisualcpp | msvcmsys)
+ # This compiler won't grok `-c -o', but also, the minuso test has
+ # not run yet. These depmodes are late enough in the game, and
+ # so weak that their functioning should not be impacted.
+ am__obj=conftest.${OBJEXT-o}
+ am__minus_obj=
+ ;;
none) break ;;
esac
- # We check with `-c' and `-o' for the sake of the "dashmstdout"
- # mode. It turns out that the SunPro C++ compiler does not properly
- # handle `-M -o', and we need to detect this.
if depmode=$depmode \
- source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+ source=sub/conftest.c object=$am__obj \
depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
- $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
>/dev/null 2>conftest.err &&
grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
- grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
+ grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
# icc doesn't choke on unknown options, it will just issue warnings
# or remarks (even with -Werror). So we grep stderr for any message
@@ -3910,7 +3949,7 @@
set dummy ${ac_tool_prefix}gcc; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then :
+if ${ac_cv_prog_CC+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$CC"; then
@@ -3950,7 +3989,7 @@
set dummy gcc; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_CC"; then
@@ -4003,7 +4042,7 @@
set dummy ${ac_tool_prefix}cc; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then :
+if ${ac_cv_prog_CC+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$CC"; then
@@ -4043,7 +4082,7 @@
set dummy cc; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then :
+if ${ac_cv_prog_CC+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$CC"; then
@@ -4102,7 +4141,7 @@
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then :
+if ${ac_cv_prog_CC+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$CC"; then
@@ -4146,7 +4185,7 @@
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_CC"; then
@@ -4200,8 +4239,8 @@
test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "no acceptable C compiler found in \$PATH
-See \`config.log' for more details." "$LINENO" 5; }
+as_fn_error $? "no acceptable C compiler found in \$PATH
+See \`config.log' for more details" "$LINENO" 5; }
# Provide some information about the compiler.
$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
@@ -4230,7 +4269,7 @@
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
-if test "${ac_cv_c_compiler_gnu+set}" = set; then :
+if ${ac_cv_c_compiler_gnu+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -4267,7 +4306,7 @@
ac_save_CFLAGS=$CFLAGS
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
$as_echo_n "checking whether $CC accepts -g... " >&6; }
-if test "${ac_cv_prog_cc_g+set}" = set; then :
+if ${ac_cv_prog_cc_g+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_save_c_werror_flag=$ac_c_werror_flag
@@ -4345,7 +4384,7 @@
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
-if test "${ac_cv_prog_cc_c89+set}" = set; then :
+if ${ac_cv_prog_cc_c89+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_cv_prog_cc_c89=no
@@ -4444,7 +4483,7 @@
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
$as_echo_n "checking dependency style of $depcc... " >&6; }
-if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
+if ${am_cv_CC_dependencies_compiler_type+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
@@ -4470,6 +4509,11 @@
if test "$am_compiler_list" = ""; then
am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
fi
+ am__universal=false
+ case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac
+
for depmode in $am_compiler_list; do
# Setup a source with many dependencies, because some compilers
# like to wrap large dependency lists on column 80 (with \), and
@@ -4487,7 +4531,17 @@
done
echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+ # We check with `-c' and `-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle `-M -o', and we need to detect this. Also, some Intel
+ # versions had trouble with output in subdirs
+ am__obj=sub/conftest.${OBJEXT-o}
+ am__minus_obj="-o $am__obj"
case $depmode in
+ gcc)
+ # This depmode causes a compiler race in universal mode.
+ test "$am__universal" = false || continue
+ ;;
nosideeffect)
# after this tag, mechanisms are not by side-effect, so they'll
# only be used when explicitly requested
@@ -4497,19 +4551,23 @@
break
fi
;;
+ msvisualcpp | msvcmsys)
+ # This compiler won't grok `-c -o', but also, the minuso test has
+ # not run yet. These depmodes are late enough in the game, and
+ # so weak that their functioning should not be impacted.
+ am__obj=conftest.${OBJEXT-o}
+ am__minus_obj=
+ ;;
none) break ;;
esac
- # We check with `-c' and `-o' for the sake of the "dashmstdout"
- # mode. It turns out that the SunPro C++ compiler does not properly
- # handle `-M -o', and we need to detect this.
if depmode=$depmode \
- source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+ source=sub/conftest.c object=$am__obj \
depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
- $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
>/dev/null 2>conftest.err &&
grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
- grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
+ grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
# icc doesn't choke on unknown options, it will just issue warnings
# or remarks (even with -Werror). So we grep stderr for any message
@@ -4560,7 +4618,7 @@
CPP=
fi
if test -z "$CPP"; then
- if test "${ac_cv_prog_CPP+set}" = set; then :
+ if ${ac_cv_prog_CPP+:} false; then :
$as_echo_n "(cached) " >&6
else
# Double quotes because CPP needs to be expanded
@@ -4590,7 +4648,7 @@
# Broken: fails on valid input.
continue
fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
# OK, works on sane cases. Now check whether nonexistent headers
# can be detected and how.
@@ -4606,11 +4664,11 @@
ac_preproc_ok=:
break
fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
done
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.i conftest.err conftest.$ac_ext
if $ac_preproc_ok; then :
break
fi
@@ -4649,7 +4707,7 @@
# Broken: fails on valid input.
continue
fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
# OK, works on sane cases. Now check whether nonexistent headers
# can be detected and how.
@@ -4665,18 +4723,18 @@
ac_preproc_ok=:
break
fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
done
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.i conftest.err conftest.$ac_ext
if $ac_preproc_ok; then :
else
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details." "$LINENO" 5; }
+as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details" "$LINENO" 5; }
fi
ac_ext=c
@@ -4702,7 +4760,7 @@
fi
set dummy $CC; ac_cc=`$as_echo "$2" |
sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
-if { as_var=ac_cv_prog_cc_${ac_cc}_c_o; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval \${ac_cv_prog_cc_${ac_cc}_c_o+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -4807,8 +4865,9 @@
# FIXME: we rely on the cache variable name because
# there is no other way.
set dummy $CC
-ac_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
-if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" != yes"; then
+am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
+eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
+if test "$am_t" != yes; then
# Losing compiler, so override with the script.
# FIXME: It is wrong to rewrite CC.
# But if we don't then we get into trouble of one sort or another.
@@ -4825,7 +4884,7 @@
set dummy ${ac_tool_prefix}objcopy; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_OBJCOPY+set}" = set; then :
+if ${ac_cv_prog_OBJCOPY+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$OBJCOPY"; then
@@ -4865,7 +4924,7 @@
set dummy objcopy; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_OBJCOPY+set}" = set; then :
+if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_OBJCOPY"; then
@@ -4916,12 +4975,19 @@
if test -n "$OBJCOPY"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $OBJCOPY supports -W" >&5
$as_echo_n "checking if $OBJCOPY supports -W... " >&6; }
-if test "${gpt_cv_objcopy_weaken+set}" = set; then :
+if ${gpt_cv_objcopy_weaken+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
void foo() {} int main() {return 0;}
+int
+main ()
+{
+
+ ;
+ return 0;
+}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
if "$OBJCOPY" -W foo conftest$ac_exeext /dev/null; then :
@@ -5046,7 +5112,7 @@
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
$as_echo_n "checking for a sed that does not truncate output... " >&6; }
-if test "${ac_cv_path_SED+set}" = set; then :
+if ${ac_cv_path_SED+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
@@ -5101,7 +5167,7 @@
done
IFS=$as_save_IFS
if test -z "$ac_cv_path_SED"; then
- as_fn_error "no acceptable sed could be found in \$PATH" "$LINENO" 5
+ as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
fi
else
ac_cv_path_SED=$SED
@@ -5128,7 +5194,7 @@
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
-if test "${ac_cv_path_GREP+set}" = set; then :
+if ${ac_cv_path_GREP+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -z "$GREP"; then
@@ -5177,7 +5243,7 @@
done
IFS=$as_save_IFS
if test -z "$ac_cv_path_GREP"; then
- as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
fi
else
ac_cv_path_GREP=$GREP
@@ -5191,7 +5257,7 @@
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
$as_echo_n "checking for egrep... " >&6; }
-if test "${ac_cv_path_EGREP+set}" = set; then :
+if ${ac_cv_path_EGREP+:} false; then :
$as_echo_n "(cached) " >&6
else
if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
@@ -5243,7 +5309,7 @@
done
IFS=$as_save_IFS
if test -z "$ac_cv_path_EGREP"; then
- as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
fi
else
ac_cv_path_EGREP=$EGREP
@@ -5258,7 +5324,7 @@
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
$as_echo_n "checking for fgrep... " >&6; }
-if test "${ac_cv_path_FGREP+set}" = set; then :
+if ${ac_cv_path_FGREP+:} false; then :
$as_echo_n "(cached) " >&6
else
if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
@@ -5310,7 +5376,7 @@
done
IFS=$as_save_IFS
if test -z "$ac_cv_path_FGREP"; then
- as_fn_error "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
fi
else
ac_cv_path_FGREP=$FGREP
@@ -5389,7 +5455,7 @@
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
$as_echo_n "checking for non-GNU ld... " >&6; }
fi
-if test "${lt_cv_path_LD+set}" = set; then :
+if ${lt_cv_path_LD+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -z "$LD"; then
@@ -5426,10 +5492,10 @@
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
-test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5
+test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
-if test "${lt_cv_prog_gnu_ld+set}" = set; then :
+if ${lt_cv_prog_gnu_ld+:} false; then :
$as_echo_n "(cached) " >&6
else
# I'd rather use --version here, but apparently some GNU lds only accept -v.
@@ -5456,7 +5522,7 @@
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5
$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
-if test "${lt_cv_path_NM+set}" = set; then :
+if ${lt_cv_path_NM+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$NM"; then
@@ -5516,7 +5582,7 @@
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_DUMPBIN+set}" = set; then :
+if ${ac_cv_prog_DUMPBIN+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$DUMPBIN"; then
@@ -5560,7 +5626,7 @@
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then :
+if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_DUMPBIN"; then
@@ -5623,18 +5689,18 @@
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5
$as_echo_n "checking the name lister ($NM) interface... " >&6; }
-if test "${lt_cv_nm_interface+set}" = set; then :
+if ${lt_cv_nm_interface+:} false; then :
$as_echo_n "(cached) " >&6
else
lt_cv_nm_interface="BSD nm"
echo "int some_variable = 0;" > conftest.$ac_ext
- (eval echo "\"\$as_me:5631: $ac_compile\"" >&5)
+ (eval echo "\"\$as_me:5697: $ac_compile\"" >&5)
(eval "$ac_compile" 2>conftest.err)
cat conftest.err >&5
- (eval echo "\"\$as_me:5634: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
+ (eval echo "\"\$as_me:5700: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
(eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
cat conftest.err >&5
- (eval echo "\"\$as_me:5637: output\"" >&5)
+ (eval echo "\"\$as_me:5703: output\"" >&5)
cat conftest.out >&5
if $GREP 'External.*some_variable' conftest.out > /dev/null; then
lt_cv_nm_interface="MS dumpbin"
@@ -5658,7 +5724,7 @@
# find the maximum length of command line arguments
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
$as_echo_n "checking the maximum length of command line arguments... " >&6; }
-if test "${lt_cv_sys_max_cmd_len+set}" = set; then :
+if ${lt_cv_sys_max_cmd_len+:} false; then :
$as_echo_n "(cached) " >&6
else
i=0
@@ -5850,7 +5916,7 @@
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
$as_echo_n "checking for $LD option to reload object files... " >&6; }
-if test "${lt_cv_ld_reload_flag+set}" = set; then :
+if ${lt_cv_ld_reload_flag+:} false; then :
$as_echo_n "(cached) " >&6
else
lt_cv_ld_reload_flag='-r'
@@ -5886,7 +5952,7 @@
set dummy ${ac_tool_prefix}objdump; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_OBJDUMP+set}" = set; then :
+if ${ac_cv_prog_OBJDUMP+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$OBJDUMP"; then
@@ -5926,7 +5992,7 @@
set dummy objdump; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then :
+if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_OBJDUMP"; then
@@ -5985,7 +6051,7 @@
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5
$as_echo_n "checking how to recognize dependent libraries... " >&6; }
-if test "${lt_cv_deplibs_check_method+set}" = set; then :
+if ${lt_cv_deplibs_check_method+:} false; then :
$as_echo_n "(cached) " >&6
else
lt_cv_file_magic_cmd='$MAGIC_CMD'
@@ -6201,7 +6267,7 @@
set dummy ${ac_tool_prefix}ar; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_AR+set}" = set; then :
+if ${ac_cv_prog_AR+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$AR"; then
@@ -6241,7 +6307,7 @@
set dummy ar; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
+if ${ac_cv_prog_ac_ct_AR+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_AR"; then
@@ -6306,7 +6372,7 @@
set dummy ${ac_tool_prefix}strip; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_STRIP+set}" = set; then :
+if ${ac_cv_prog_STRIP+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$STRIP"; then
@@ -6346,7 +6412,7 @@
set dummy strip; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
+if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_STRIP"; then
@@ -6405,7 +6471,7 @@
set dummy ${ac_tool_prefix}ranlib; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_RANLIB+set}" = set; then :
+if ${ac_cv_prog_RANLIB+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$RANLIB"; then
@@ -6445,7 +6511,7 @@
set dummy ranlib; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
+if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_RANLIB"; then
@@ -6562,7 +6628,7 @@
# Check for command to grab the raw symbol name followed by C symbol from nm.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; }
-if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then :
+if ${lt_cv_sys_global_symbol_pipe+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -6839,7 +6905,7 @@
;;
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 6842 "configure"' > conftest.$ac_ext
+ echo '#line 6908 "configure"' > conftest.$ac_ext
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -6933,7 +6999,7 @@
CFLAGS="$CFLAGS -belf"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
$as_echo_n "checking whether the C compiler needs -belf... " >&6; }
-if test "${lt_cv_cc_needs_belf+set}" = set; then :
+if ${lt_cv_cc_needs_belf+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_ext=c
@@ -7009,7 +7075,7 @@
set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_DSYMUTIL+set}" = set; then :
+if ${ac_cv_prog_DSYMUTIL+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$DSYMUTIL"; then
@@ -7049,7 +7115,7 @@
set dummy dsymutil; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then :
+if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_DSYMUTIL"; then
@@ -7101,7 +7167,7 @@
set dummy ${ac_tool_prefix}nmedit; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_NMEDIT+set}" = set; then :
+if ${ac_cv_prog_NMEDIT+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$NMEDIT"; then
@@ -7141,7 +7207,7 @@
set dummy nmedit; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then :
+if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_NMEDIT"; then
@@ -7193,7 +7259,7 @@
set dummy ${ac_tool_prefix}lipo; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_LIPO+set}" = set; then :
+if ${ac_cv_prog_LIPO+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$LIPO"; then
@@ -7233,7 +7299,7 @@
set dummy lipo; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_LIPO+set}" = set; then :
+if ${ac_cv_prog_ac_ct_LIPO+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_LIPO"; then
@@ -7285,7 +7351,7 @@
set dummy ${ac_tool_prefix}otool; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_OTOOL+set}" = set; then :
+if ${ac_cv_prog_OTOOL+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$OTOOL"; then
@@ -7325,7 +7391,7 @@
set dummy otool; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_OTOOL+set}" = set; then :
+if ${ac_cv_prog_ac_ct_OTOOL+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_OTOOL"; then
@@ -7377,7 +7443,7 @@
set dummy ${ac_tool_prefix}otool64; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_OTOOL64+set}" = set; then :
+if ${ac_cv_prog_OTOOL64+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$OTOOL64"; then
@@ -7417,7 +7483,7 @@
set dummy otool64; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_OTOOL64+set}" = set; then :
+if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_OTOOL64"; then
@@ -7492,7 +7558,7 @@
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5
$as_echo_n "checking for -single_module linker flag... " >&6; }
-if test "${lt_cv_apple_cc_single_mod+set}" = set; then :
+if ${lt_cv_apple_cc_single_mod+:} false; then :
$as_echo_n "(cached) " >&6
else
lt_cv_apple_cc_single_mod=no
@@ -7521,7 +7587,7 @@
$as_echo "$lt_cv_apple_cc_single_mod" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; }
-if test "${lt_cv_ld_exported_symbols_list+set}" = set; then :
+if ${lt_cv_ld_exported_symbols_list+:} false; then :
$as_echo_n "(cached) " >&6
else
lt_cv_ld_exported_symbols_list=no
@@ -7589,7 +7655,7 @@
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
$as_echo_n "checking for ANSI C header files... " >&6; }
-if test "${ac_cv_header_stdc+set}" = set; then :
+if ${ac_cv_header_stdc+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -7706,8 +7772,7 @@
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
"
-eval as_val=\$$as_ac_Header
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
@@ -7721,7 +7786,7 @@
do :
ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
"
-if test "x$ac_cv_header_dlfcn_h" = x""yes; then :
+if test "x$ac_cv_header_dlfcn_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_DLFCN_H 1
_ACEOF
@@ -7748,7 +7813,7 @@
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CXX+set}" = set; then :
+if ${ac_cv_prog_CXX+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$CXX"; then
@@ -7792,7 +7857,7 @@
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then :
+if ${ac_cv_prog_ac_ct_CXX+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_CXX"; then
@@ -7870,7 +7935,7 @@
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
-if test "${ac_cv_cxx_compiler_gnu+set}" = set; then :
+if ${ac_cv_cxx_compiler_gnu+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -7907,7 +7972,7 @@
ac_save_CXXFLAGS=$CXXFLAGS
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
$as_echo_n "checking whether $CXX accepts -g... " >&6; }
-if test "${ac_cv_prog_cxx_g+set}" = set; then :
+if ${ac_cv_prog_cxx_g+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_save_cxx_werror_flag=$ac_cxx_werror_flag
@@ -7993,7 +8058,7 @@
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
$as_echo_n "checking dependency style of $depcc... " >&6; }
-if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then :
+if ${am_cv_CXX_dependencies_compiler_type+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
@@ -8019,6 +8084,11 @@
if test "$am_compiler_list" = ""; then
am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
fi
+ am__universal=false
+ case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac
+
for depmode in $am_compiler_list; do
# Setup a source with many dependencies, because some compilers
# like to wrap large dependency lists on column 80 (with \), and
@@ -8036,7 +8106,17 @@
done
echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+ # We check with `-c' and `-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle `-M -o', and we need to detect this. Also, some Intel
+ # versions had trouble with output in subdirs
+ am__obj=sub/conftest.${OBJEXT-o}
+ am__minus_obj="-o $am__obj"
case $depmode in
+ gcc)
+ # This depmode causes a compiler race in universal mode.
+ test "$am__universal" = false || continue
+ ;;
nosideeffect)
# after this tag, mechanisms are not by side-effect, so they'll
# only be used when explicitly requested
@@ -8046,19 +8126,23 @@
break
fi
;;
+ msvisualcpp | msvcmsys)
+ # This compiler won't grok `-c -o', but also, the minuso test has
+ # not run yet. These depmodes are late enough in the game, and
+ # so weak that their functioning should not be impacted.
+ am__obj=conftest.${OBJEXT-o}
+ am__minus_obj=
+ ;;
none) break ;;
esac
- # We check with `-c' and `-o' for the sake of the "dashmstdout"
- # mode. It turns out that the SunPro C++ compiler does not properly
- # handle `-M -o', and we need to detect this.
if depmode=$depmode \
- source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+ source=sub/conftest.c object=$am__obj \
depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
- $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
>/dev/null 2>conftest.err &&
grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
- grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
+ grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
# icc doesn't choke on unknown options, it will just issue warnings
# or remarks (even with -Werror). So we grep stderr for any message
@@ -8108,7 +8192,7 @@
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
if test -z "$CXXCPP"; then
- if test "${ac_cv_prog_CXXCPP+set}" = set; then :
+ if ${ac_cv_prog_CXXCPP+:} false; then :
$as_echo_n "(cached) " >&6
else
# Double quotes because CXXCPP needs to be expanded
@@ -8138,7 +8222,7 @@
# Broken: fails on valid input.
continue
fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
# OK, works on sane cases. Now check whether nonexistent headers
# can be detected and how.
@@ -8154,11 +8238,11 @@
ac_preproc_ok=:
break
fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
done
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.i conftest.err conftest.$ac_ext
if $ac_preproc_ok; then :
break
fi
@@ -8197,7 +8281,7 @@
# Broken: fails on valid input.
continue
fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
# OK, works on sane cases. Now check whether nonexistent headers
# can be detected and how.
@@ -8213,11 +8297,11 @@
ac_preproc_ok=:
break
fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
done
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.i conftest.err conftest.$ac_ext
if $ac_preproc_ok; then :
else
@@ -8384,7 +8468,7 @@
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
$as_echo_n "checking for objdir... " >&6; }
-if test "${lt_cv_objdir+set}" = set; then :
+if ${lt_cv_objdir+:} false; then :
$as_echo_n "(cached) " >&6
else
rm -f .libs 2>/dev/null
@@ -8492,7 +8576,7 @@
if test "$file_magic_cmd" = '$MAGIC_CMD'; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; }
-if test "${lt_cv_path_MAGIC_CMD+set}" = set; then :
+if ${lt_cv_path_MAGIC_CMD+:} false; then :
$as_echo_n "(cached) " >&6
else
case $MAGIC_CMD in
@@ -8558,7 +8642,7 @@
if test -n "$ac_tool_prefix"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5
$as_echo_n "checking for file... " >&6; }
-if test "${lt_cv_path_MAGIC_CMD+set}" = set; then :
+if ${lt_cv_path_MAGIC_CMD+:} false; then :
$as_echo_n "(cached) " >&6
else
case $MAGIC_CMD in
@@ -8695,7 +8779,7 @@
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
-if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then :
+if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then :
$as_echo_n "(cached) " >&6
else
lt_cv_prog_compiler_rtti_exceptions=no
@@ -8711,11 +8795,11 @@
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:8714: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:8798: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:8718: \$? = $ac_status" >&5
+ echo "$as_me:8802: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -9034,7 +9118,7 @@
if test -n "$lt_prog_compiler_pic"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
-if test "${lt_cv_prog_compiler_pic_works+set}" = set; then :
+if ${lt_cv_prog_compiler_pic_works+:} false; then :
$as_echo_n "(cached) " >&6
else
lt_cv_prog_compiler_pic_works=no
@@ -9050,11 +9134,11 @@
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:9053: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:9137: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:9057: \$? = $ac_status" >&5
+ echo "$as_me:9141: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -9093,7 +9177,7 @@
wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
-if test "${lt_cv_prog_compiler_static_works+set}" = set; then :
+if ${lt_cv_prog_compiler_static_works+:} false; then :
$as_echo_n "(cached) " >&6
else
lt_cv_prog_compiler_static_works=no
@@ -9136,7 +9220,7 @@
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
-if test "${lt_cv_prog_compiler_c_o+set}" = set; then :
+if ${lt_cv_prog_compiler_c_o+:} false; then :
$as_echo_n "(cached) " >&6
else
lt_cv_prog_compiler_c_o=no
@@ -9155,11 +9239,11 @@
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:9158: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:9242: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:9162: \$? = $ac_status" >&5
+ echo "$as_me:9246: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -9191,7 +9275,7 @@
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
-if test "${lt_cv_prog_compiler_c_o+set}" = set; then :
+if ${lt_cv_prog_compiler_c_o+:} false; then :
$as_echo_n "(cached) " >&6
else
lt_cv_prog_compiler_c_o=no
@@ -9210,11 +9294,11 @@
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:9213: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:9297: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:9217: \$? = $ac_status" >&5
+ echo "$as_me:9301: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -9998,6 +10082,13 @@
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int foo(void) {}
+int
+main ()
+{
+
+ ;
+ return 0;
+}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
@@ -11336,7 +11427,7 @@
# if libdl is installed we need to link against it
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
$as_echo_n "checking for dlopen in -ldl... " >&6; }
-if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
+if ${ac_cv_lib_dl_dlopen+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -11370,7 +11461,7 @@
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
-if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
+if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
else
@@ -11384,12 +11475,12 @@
*)
ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
-if test "x$ac_cv_func_shl_load" = x""yes; then :
+if test "x$ac_cv_func_shl_load" = xyes; then :
lt_cv_dlopen="shl_load"
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
$as_echo_n "checking for shl_load in -ldld... " >&6; }
-if test "${ac_cv_lib_dld_shl_load+set}" = set; then :
+if ${ac_cv_lib_dld_shl_load+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -11423,16 +11514,16 @@
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
-if test "x$ac_cv_lib_dld_shl_load" = x""yes; then :
+if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"
else
ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
-if test "x$ac_cv_func_dlopen" = x""yes; then :
+if test "x$ac_cv_func_dlopen" = xyes; then :
lt_cv_dlopen="dlopen"
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
$as_echo_n "checking for dlopen in -ldl... " >&6; }
-if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
+if ${ac_cv_lib_dl_dlopen+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -11466,12 +11557,12 @@
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
-if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
+if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
$as_echo_n "checking for dlopen in -lsvld... " >&6; }
-if test "${ac_cv_lib_svld_dlopen+set}" = set; then :
+if ${ac_cv_lib_svld_dlopen+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -11505,12 +11596,12 @@
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
$as_echo "$ac_cv_lib_svld_dlopen" >&6; }
-if test "x$ac_cv_lib_svld_dlopen" = x""yes; then :
+if test "x$ac_cv_lib_svld_dlopen" = xyes; then :
lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
$as_echo_n "checking for dld_link in -ldld... " >&6; }
-if test "${ac_cv_lib_dld_dld_link+set}" = set; then :
+if ${ac_cv_lib_dld_dld_link+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -11544,7 +11635,7 @@
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
$as_echo "$ac_cv_lib_dld_dld_link" >&6; }
-if test "x$ac_cv_lib_dld_dld_link" = x""yes; then :
+if test "x$ac_cv_lib_dld_dld_link" = xyes; then :
lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"
fi
@@ -11585,7 +11676,7 @@
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
$as_echo_n "checking whether a program can dlopen itself... " >&6; }
-if test "${lt_cv_dlopen_self+set}" = set; then :
+if ${lt_cv_dlopen_self+:} false; then :
$as_echo_n "(cached) " >&6
else
if test "$cross_compiling" = yes; then :
@@ -11594,7 +11685,7 @@
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11597 "configure"
+#line 11688 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11681,7 +11772,7 @@
wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
-if test "${lt_cv_dlopen_self_static+set}" = set; then :
+if ${lt_cv_dlopen_self_static+:} false; then :
$as_echo_n "(cached) " >&6
else
if test "$cross_compiling" = yes; then :
@@ -11690,7 +11781,7 @@
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11693 "configure"
+#line 11784 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -12068,7 +12159,7 @@
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
$as_echo_n "checking for non-GNU ld... " >&6; }
fi
-if test "${lt_cv_path_LD+set}" = set; then :
+if ${lt_cv_path_LD+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -z "$LD"; then
@@ -12105,10 +12196,10 @@
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
-test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5
+test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
-if test "${lt_cv_prog_gnu_ld+set}" = set; then :
+if ${lt_cv_prog_gnu_ld+:} false; then :
$as_echo_n "(cached) " >&6
else
# I'd rather use --version here, but apparently some GNU lds only accept -v.
@@ -13630,7 +13721,7 @@
if test -n "$lt_prog_compiler_pic_CXX"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5
$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; }
-if test "${lt_cv_prog_compiler_pic_works_CXX+set}" = set; then :
+if ${lt_cv_prog_compiler_pic_works_CXX+:} false; then :
$as_echo_n "(cached) " >&6
else
lt_cv_prog_compiler_pic_works_CXX=no
@@ -13646,11 +13737,11 @@
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:13649: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:13740: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:13653: \$? = $ac_status" >&5
+ echo "$as_me:13744: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -13686,7 +13777,7 @@
wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
-if test "${lt_cv_prog_compiler_static_works_CXX+set}" = set; then :
+if ${lt_cv_prog_compiler_static_works_CXX+:} false; then :
$as_echo_n "(cached) " >&6
else
lt_cv_prog_compiler_static_works_CXX=no
@@ -13726,7 +13817,7 @@
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
-if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then :
+if ${lt_cv_prog_compiler_c_o_CXX+:} false; then :
$as_echo_n "(cached) " >&6
else
lt_cv_prog_compiler_c_o_CXX=no
@@ -13745,11 +13836,11 @@
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:13748: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:13839: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:13752: \$? = $ac_status" >&5
+ echo "$as_me:13843: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -13778,7 +13869,7 @@
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
-if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then :
+if ${lt_cv_prog_compiler_c_o_CXX+:} false; then :
$as_echo_n "(cached) " >&6
else
lt_cv_prog_compiler_c_o_CXX=no
@@ -13797,11 +13888,11 @@
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:13800: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:13891: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:13804: \$? = $ac_status" >&5
+ echo "$as_me:13895: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -14776,7 +14867,7 @@
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
$as_echo_n "checking for inline... " >&6; }
-if test "${ac_cv_c_inline+set}" = set; then :
+if ${ac_cv_c_inline+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_cv_c_inline=no
@@ -14819,7 +14910,7 @@
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __attribute__" >&5
$as_echo_n "checking for __attribute__... " >&6; }
- if test "${ac_cv___attribute__+set}" = set; then :
+ if ${ac_cv___attribute__+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -14857,7 +14948,7 @@
# Check whether some low-level functions/files are available
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
$as_echo_n "checking for ANSI C header files... " >&6; }
-if test "${ac_cv_header_stdc+set}" = set; then :
+if ${ac_cv_header_stdc+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -14970,7 +15061,7 @@
# TODO(csilvers): we could remove a lot when WITH_CPU_PROFILER etc is "no".
ac_fn_c_check_type "$LINENO" "__int64" "ac_cv_type___int64" "$ac_includes_default"
-if test "x$ac_cv_type___int64" = x""yes; then :
+if test "x$ac_cv_type___int64" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE___INT64 1
@@ -14981,7 +15072,7 @@
# defined in some windows platforms
ac_fn_c_check_type "$LINENO" "struct mallinfo" "ac_cv_type_struct_mallinfo" "#include <malloc.h>
"
-if test "x$ac_cv_type_struct_mallinfo" = x""yes; then :
+if test "x$ac_cv_type_struct_mallinfo" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_STRUCT_MALLINFO 1
@@ -14992,7 +15083,7 @@
ac_fn_c_check_type "$LINENO" "Elf32_Versym" "ac_cv_type_Elf32_Versym" "#include <elf.h>
"
-if test "x$ac_cv_type_Elf32_Versym" = x""yes; then :
+if test "x$ac_cv_type_Elf32_Versym" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_ELF32_VERSYM 1
@@ -15004,7 +15095,7 @@
for ac_func in sbrk
do :
ac_fn_c_check_func "$LINENO" "sbrk" "ac_cv_func_sbrk"
-if test "x$ac_cv_func_sbrk" = x""yes; then :
+if test "x$ac_cv_func_sbrk" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_SBRK 1
_ACEOF
@@ -15015,7 +15106,7 @@
for ac_func in geteuid
do :
ac_fn_c_check_func "$LINENO" "geteuid" "ac_cv_func_geteuid"
-if test "x$ac_cv_func_geteuid" = x""yes; then :
+if test "x$ac_cv_func_geteuid" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_GETEUID 1
_ACEOF
@@ -15026,7 +15117,7 @@
for ac_header in features.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "features.h" "ac_cv_header_features_h" "$ac_includes_default"
-if test "x$ac_cv_header_features_h" = x""yes; then :
+if test "x$ac_cv_header_features_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_FEATURES_H 1
_ACEOF
@@ -15038,7 +15129,7 @@
for ac_header in malloc.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "malloc.h" "ac_cv_header_malloc_h" "$ac_includes_default"
-if test "x$ac_cv_header_malloc_h" = x""yes; then :
+if test "x$ac_cv_header_malloc_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_MALLOC_H 1
_ACEOF
@@ -15050,7 +15141,7 @@
for ac_header in sys/malloc.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "sys/malloc.h" "ac_cv_header_sys_malloc_h" "$ac_includes_default"
-if test "x$ac_cv_header_sys_malloc_h" = x""yes; then :
+if test "x$ac_cv_header_sys_malloc_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_SYS_MALLOC_H 1
_ACEOF
@@ -15062,7 +15153,7 @@
for ac_header in malloc/malloc.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "malloc/malloc.h" "ac_cv_header_malloc_malloc_h" "$ac_includes_default"
-if test "x$ac_cv_header_malloc_malloc_h" = x""yes; then :
+if test "x$ac_cv_header_malloc_malloc_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_MALLOC_MALLOC_H 1
_ACEOF
@@ -15074,7 +15165,7 @@
for ac_header in glob.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "glob.h" "ac_cv_header_glob_h" "$ac_includes_default"
-if test "x$ac_cv_header_glob_h" = x""yes; then :
+if test "x$ac_cv_header_glob_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_GLOB_H 1
_ACEOF
@@ -15086,7 +15177,7 @@
for ac_header in execinfo.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "execinfo.h" "ac_cv_header_execinfo_h" "$ac_includes_default"
-if test "x$ac_cv_header_execinfo_h" = x""yes; then :
+if test "x$ac_cv_header_execinfo_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_EXECINFO_H 1
_ACEOF
@@ -15098,7 +15189,7 @@
for ac_header in libunwind.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "libunwind.h" "ac_cv_header_libunwind_h" "$ac_includes_default"
-if test "x$ac_cv_header_libunwind_h" = x""yes; then :
+if test "x$ac_cv_header_libunwind_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_LIBUNWIND_H 1
_ACEOF
@@ -15110,7 +15201,7 @@
for ac_header in unwind.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "unwind.h" "ac_cv_header_unwind_h" "$ac_includes_default"
-if test "x$ac_cv_header_unwind_h" = x""yes; then :
+if test "x$ac_cv_header_unwind_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_UNWIND_H 1
_ACEOF
@@ -15122,7 +15213,7 @@
for ac_header in sched.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "sched.h" "ac_cv_header_sched_h" "$ac_includes_default"
-if test "x$ac_cv_header_sched_h" = x""yes; then :
+if test "x$ac_cv_header_sched_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_SCHED_H 1
_ACEOF
@@ -15134,7 +15225,7 @@
for ac_header in conflict-signal.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "conflict-signal.h" "ac_cv_header_conflict_signal_h" "$ac_includes_default"
-if test "x$ac_cv_header_conflict_signal_h" = x""yes; then :
+if test "x$ac_cv_header_conflict_signal_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_CONFLICT_SIGNAL_H 1
_ACEOF
@@ -15146,7 +15237,7 @@
for ac_header in sys/prctl.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "sys/prctl.h" "ac_cv_header_sys_prctl_h" "$ac_includes_default"
-if test "x$ac_cv_header_sys_prctl_h" = x""yes; then :
+if test "x$ac_cv_header_sys_prctl_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_SYS_PRCTL_H 1
_ACEOF
@@ -15158,7 +15249,7 @@
for ac_header in linux/ptrace.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "linux/ptrace.h" "ac_cv_header_linux_ptrace_h" "$ac_includes_default"
-if test "x$ac_cv_header_linux_ptrace_h" = x""yes; then :
+if test "x$ac_cv_header_linux_ptrace_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_LINUX_PTRACE_H 1
_ACEOF
@@ -15170,7 +15261,7 @@
for ac_header in sys/syscall.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "sys/syscall.h" "ac_cv_header_sys_syscall_h" "$ac_includes_default"
-if test "x$ac_cv_header_sys_syscall_h" = x""yes; then :
+if test "x$ac_cv_header_sys_syscall_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_SYS_SYSCALL_H 1
_ACEOF
@@ -15182,7 +15273,7 @@
for ac_header in sys/socket.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$ac_includes_default"
-if test "x$ac_cv_header_sys_socket_h" = x""yes; then :
+if test "x$ac_cv_header_sys_socket_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_SYS_SOCKET_H 1
_ACEOF
@@ -15194,7 +15285,7 @@
for ac_header in sys/wait.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "sys/wait.h" "ac_cv_header_sys_wait_h" "$ac_includes_default"
-if test "x$ac_cv_header_sys_wait_h" = x""yes; then :
+if test "x$ac_cv_header_sys_wait_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_SYS_WAIT_H 1
_ACEOF
@@ -15206,7 +15297,7 @@
for ac_header in poll.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "poll.h" "ac_cv_header_poll_h" "$ac_includes_default"
-if test "x$ac_cv_header_poll_h" = x""yes; then :
+if test "x$ac_cv_header_poll_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_POLL_H 1
_ACEOF
@@ -15218,7 +15309,7 @@
for ac_header in fcntl.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "fcntl.h" "ac_cv_header_fcntl_h" "$ac_includes_default"
-if test "x$ac_cv_header_fcntl_h" = x""yes; then :
+if test "x$ac_cv_header_fcntl_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_FCNTL_H 1
_ACEOF
@@ -15230,7 +15321,7 @@
for ac_header in grp.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "grp.h" "ac_cv_header_grp_h" "$ac_includes_default"
-if test "x$ac_cv_header_grp_h" = x""yes; then :
+if test "x$ac_cv_header_grp_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_GRP_H 1
_ACEOF
@@ -15242,7 +15333,7 @@
for ac_header in pwd.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "pwd.h" "ac_cv_header_pwd_h" "$ac_includes_default"
-if test "x$ac_cv_header_pwd_h" = x""yes; then :
+if test "x$ac_cv_header_pwd_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_PWD_H 1
_ACEOF
@@ -15254,7 +15345,7 @@
for ac_header in sys/resource.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "sys/resource.h" "ac_cv_header_sys_resource_h" "$ac_includes_default"
-if test "x$ac_cv_header_sys_resource_h" = x""yes; then :
+if test "x$ac_cv_header_sys_resource_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_SYS_RESOURCE_H 1
_ACEOF
@@ -15266,7 +15357,7 @@
for ac_header in valgrind.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "valgrind.h" "ac_cv_header_valgrind_h" "$ac_includes_default"
-if test "x$ac_cv_header_valgrind_h" = x""yes; then :
+if test "x$ac_cv_header_valgrind_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_VALGRIND_H 1
_ACEOF
@@ -15278,7 +15369,7 @@
for ac_header in sys/cdefs.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "sys/cdefs.h" "ac_cv_header_sys_cdefs_h" "$ac_includes_default"
-if test "x$ac_cv_header_sys_cdefs_h" = x""yes; then :
+if test "x$ac_cv_header_sys_cdefs_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_SYS_CDEFS_H 1
_ACEOF
@@ -15290,7 +15381,7 @@
for ac_header in features.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "features.h" "ac_cv_header_features_h" "$ac_includes_default"
-if test "x$ac_cv_header_features_h" = x""yes; then :
+if test "x$ac_cv_header_features_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_FEATURES_H 1
_ACEOF
@@ -15308,7 +15399,7 @@
#include <stdlib.h>
#include <malloc.h>
"
-if test "x$ac_cv_have_decl_cfree" = x""yes; then :
+if test "x$ac_cv_have_decl_cfree" = xyes; then :
ac_have_decl=1
else
ac_have_decl=0
@@ -15321,7 +15412,7 @@
#include <stdlib.h>
#include <malloc.h>
"
-if test "x$ac_cv_have_decl_posix_memalign" = x""yes; then :
+if test "x$ac_cv_have_decl_posix_memalign" = xyes; then :
ac_have_decl=1
else
ac_have_decl=0
@@ -15334,7 +15425,7 @@
#include <stdlib.h>
#include <malloc.h>
"
-if test "x$ac_cv_have_decl_memalign" = x""yes; then :
+if test "x$ac_cv_have_decl_memalign" = xyes; then :
ac_have_decl=1
else
ac_have_decl=0
@@ -15347,7 +15438,7 @@
#include <stdlib.h>
#include <malloc.h>
"
-if test "x$ac_cv_have_decl_valloc" = x""yes; then :
+if test "x$ac_cv_have_decl_valloc" = xyes; then :
ac_have_decl=1
else
ac_have_decl=0
@@ -15360,7 +15451,7 @@
#include <stdlib.h>
#include <malloc.h>
"
-if test "x$ac_cv_have_decl_pvalloc" = x""yes; then :
+if test "x$ac_cv_have_decl_pvalloc" = xyes; then :
ac_have_decl=1
else
ac_have_decl=0
@@ -15391,7 +15482,13 @@
$as_echo "#define HAVE_MMAP 1" >>confdefs.h
;;
- *)
+ *) if test "$cross_compiling" = yes; then
+ ac_cv_func_mmap_fixed_mapped=yes
+
+$as_echo "#define HAVE_MMAP 1" >>confdefs.h
+
+ else
+
for ac_header in $ac_header_list
@@ -15399,8 +15496,7 @@
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
"
-eval as_val=\$$as_ac_Header
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
@@ -15419,7 +15515,7 @@
for ac_func in getpagesize
do :
ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
-if test "x$ac_cv_func_getpagesize" = x""yes; then :
+if test "x$ac_cv_func_getpagesize" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_GETPAGESIZE 1
_ACEOF
@@ -15429,7 +15525,7 @@
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
$as_echo_n "checking for working mmap... " >&6; }
-if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then :
+if ${ac_cv_func_mmap_fixed_mapped+:} false; then :
$as_echo_n "(cached) " >&6
else
if test "$cross_compiling" = yes; then :
@@ -15593,6 +15689,7 @@
fi
rm -f conftest.mmap conftest.txt
+ fi
;;
esac
@@ -15633,7 +15730,7 @@
for ac_header in ucontext.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "ucontext.h" "ac_cv_header_ucontext_h" "$ac_includes_default"
-if test "x$ac_cv_header_ucontext_h" = x""yes; then :
+if test "x$ac_cv_header_ucontext_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_UCONTEXT_H 1
_ACEOF
@@ -15653,7 +15750,7 @@
for ac_header in sys/ucontext.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "sys/ucontext.h" "ac_cv_header_sys_ucontext_h" "$ac_includes_default"
-if test "x$ac_cv_header_sys_ucontext_h" = x""yes; then :
+if test "x$ac_cv_header_sys_ucontext_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_SYS_UCONTEXT_H 1
_ACEOF
@@ -15666,7 +15763,7 @@
for ac_header in cygwin/signal.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "cygwin/signal.h" "ac_cv_header_cygwin_signal_h" "$ac_includes_default"
-if test "x$ac_cv_header_cygwin_signal_h" = x""yes; then :
+if test "x$ac_cv_header_cygwin_signal_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_CYGWIN_SIGNAL_H 1
_ACEOF
@@ -15847,7 +15944,7 @@
# We want to link in libunwind if it exists
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for backtrace in -lunwind" >&5
$as_echo_n "checking for backtrace in -lunwind... " >&6; }
-if test "${ac_cv_lib_unwind_backtrace+set}" = set; then :
+if ${ac_cv_lib_unwind_backtrace+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -15881,7 +15978,7 @@
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_unwind_backtrace" >&5
$as_echo "$ac_cv_lib_unwind_backtrace" >&6; }
-if test "x$ac_cv_lib_unwind_backtrace" = x""yes; then :
+if test "x$ac_cv_lib_unwind_backtrace" = xyes; then :
UNWIND_LIBS=-lunwind
else
UNWIND_LIBS=
@@ -15889,8 +15986,7 @@
-# On x86_64, instead of libunwind, we can choose to compile with frame-pointers
-# (This isn't needed on i386, where -fno-omit-frame-pointer is the default).
+# On x86_64, instead of libunwind, we can choose to compile with frame-pointers.
# Check whether --enable-frame_pointers was given.
if test "${enable_frame_pointers+set}" = set; then :
enableval=$enable_frame_pointers;
@@ -15907,8 +16003,7 @@
fi
-# Some x86_64 systems do not insert frame pointers by default (all
-# i386 systems that I know of, do. I don't know about non-x86 chips).
+# Some x86_64 systems do not insert frame pointers by default.
# We want to see if the current system is one of those.
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -15993,7 +16088,7 @@
# which we don't care about.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the compiler supports -Wno-unused-result" >&5
$as_echo_n "checking if the compiler supports -Wno-unused-result... " >&6; }
-if test "${perftools_cv_w_no_unused_result+set}" = set; then :
+if ${perftools_cv_w_no_unused_result+:} false; then :
$as_echo_n "(cached) " >&6
else
OLD_CFLAGS="$CFLAGS"
@@ -16035,7 +16130,7 @@
# Defines PRIuS
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking printf format code for printing a size_t and ssize_t" >&5
$as_echo_n "checking printf format code for printing a size_t and ssize_t... " >&6; }
-if test "${ac_cv_formatting_prius_prefix+set}" = set; then :
+if ${ac_cv_formatting_prius_prefix+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -16138,6 +16233,33 @@
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
+# Check for __builtin_expect()
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_expect()" >&5
+$as_echo_n "checking for __builtin_expect()... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+return __builtin_expect(main != 0, 1)
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+
+$as_echo "#define HAVE_BUILTIN_EXPECT 1" >>confdefs.h
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
# Check if __environ is available (for GetenvBeforeMain)
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __environ" >&5
$as_echo_n "checking for __environ... " >&6; }
@@ -16284,7 +16406,7 @@
LIBS="$OLD_LIBS"
fi
if test "x$acx_nanosleep_ok" != "xyes"; then
- as_fn_error "cannot find the nanosleep function" "$LINENO" 5
+ as_fn_error $? "cannot find the nanosleep function" "$LINENO" 5
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${NANOSLEEP_LIBS:-no}" >&5
$as_echo "${NANOSLEEP_LIBS:-no}" >&6; }
@@ -16311,7 +16433,7 @@
# We also need to check if the kernel supports __thread, which requires uname()
ac_fn_c_check_decl "$LINENO" "uname" "ac_cv_have_decl_uname" "#include <sys/utsname.h>
"
-if test "x$ac_cv_have_decl_uname" = x""yes; then :
+if test "x$ac_cv_have_decl_uname" = xyes; then :
ac_have_decl=1
else
ac_have_decl=0
@@ -16448,7 +16570,7 @@
set dummy pthread-config; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_acx_pthread_config+set}" = set; then :
+if ${ac_cv_prog_acx_pthread_config+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$acx_pthread_config"; then
@@ -16603,7 +16725,7 @@
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_PTHREAD_CC+set}" = set; then :
+if ${ac_cv_prog_PTHREAD_CC+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$PTHREAD_CC"; then
@@ -16920,7 +17042,7 @@
# Find out what namespace 'normal' STL code lives in
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler implements namespaces" >&5
$as_echo_n "checking whether the compiler implements namespaces... " >&6; }
-if test "${ac_cv_cxx_namespaces+set}" = set; then :
+if ${ac_cv_cxx_namespaces+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -16964,7 +17086,7 @@
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what namespace STL code is in" >&5
$as_echo_n "checking what namespace STL code is in... " >&6; }
-if test "${ac_cv_cxx_stl_namespace+set}" = set; then :
+if ${ac_cv_cxx_stl_namespace+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -17029,7 +17151,7 @@
# Figure out where libc has program_invocation_name
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for program_invocation_name" >&5
$as_echo_n "checking for program_invocation_name... " >&6; }
-if test "${ac_cv_have_program_invocation_name+set}" = set; then :
+if ${ac_cv_have_program_invocation_name+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -17248,10 +17370,21 @@
:end' >>confcache
if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
if test -w "$cache_file"; then
- test "x$cache_file" != "x/dev/null" &&
+ if test "x$cache_file" != "x/dev/null"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
$as_echo "$as_me: updating cache $cache_file" >&6;}
- cat confcache >$cache_file
+ if test ! -f "$cache_file" || test -h "$cache_file"; then
+ cat confcache >"$cache_file"
+ else
+ case $cache_file in #(
+ */* | ?:*)
+ mv -f confcache "$cache_file"$$ &&
+ mv -f "$cache_file"$$ "$cache_file" ;; #(
+ *)
+ mv -f confcache "$cache_file" ;;
+ esac
+ fi
+ fi
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
@@ -17267,6 +17400,7 @@
ac_libobjs=
ac_ltlibobjs=
+U=
for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
# 1. Remove the extension, and $U if already installed.
ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
@@ -17282,87 +17416,87 @@
if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
- as_fn_error "conditional \"AMDEP\" was never defined.
+ as_fn_error $? "conditional \"AMDEP\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
- as_fn_error "conditional \"am__fastdepCXX\" was never defined.
+ as_fn_error $? "conditional \"am__fastdepCXX\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
- as_fn_error "conditional \"am__fastdepCC\" was never defined.
+ as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${GCC_TRUE}" && test -z "${GCC_FALSE}"; then
- as_fn_error "conditional \"GCC\" was never defined.
+ as_fn_error $? "conditional \"GCC\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${HAVE_OBJCOPY_WEAKEN_TRUE}" && test -z "${HAVE_OBJCOPY_WEAKEN_FALSE}"; then
- as_fn_error "conditional \"HAVE_OBJCOPY_WEAKEN\" was never defined.
+ as_fn_error $? "conditional \"HAVE_OBJCOPY_WEAKEN\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
- as_fn_error "conditional \"am__fastdepCXX\" was never defined.
+ as_fn_error $? "conditional \"am__fastdepCXX\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${USE_LIBTOOL_TRUE}" && test -z "${USE_LIBTOOL_FALSE}"; then
- as_fn_error "conditional \"USE_LIBTOOL\" was never defined.
+ as_fn_error $? "conditional \"USE_LIBTOOL\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${ENABLE_STATIC_TRUE}" && test -z "${ENABLE_STATIC_FALSE}"; then
- as_fn_error "conditional \"ENABLE_STATIC\" was never defined.
+ as_fn_error $? "conditional \"ENABLE_STATIC\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${ENABLE_FRAME_POINTERS_TRUE}" && test -z "${ENABLE_FRAME_POINTERS_FALSE}"; then
- as_fn_error "conditional \"ENABLE_FRAME_POINTERS\" was never defined.
+ as_fn_error $? "conditional \"ENABLE_FRAME_POINTERS\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${X86_64_AND_NO_FP_BY_DEFAULT_TRUE}" && test -z "${X86_64_AND_NO_FP_BY_DEFAULT_FALSE}"; then
- as_fn_error "conditional \"X86_64_AND_NO_FP_BY_DEFAULT\" was never defined.
+ as_fn_error $? "conditional \"X86_64_AND_NO_FP_BY_DEFAULT\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${I386_TRUE}" && test -z "${I386_FALSE}"; then
- as_fn_error "conditional \"I386\" was never defined.
+ as_fn_error $? "conditional \"I386\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${HAVE_W_NO_UNUSED_RESULT_TRUE}" && test -z "${HAVE_W_NO_UNUSED_RESULT_FALSE}"; then
- as_fn_error "conditional \"HAVE_W_NO_UNUSED_RESULT\" was never defined.
+ as_fn_error $? "conditional \"HAVE_W_NO_UNUSED_RESULT\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${MINGW_TRUE}" && test -z "${MINGW_FALSE}"; then
- as_fn_error "conditional \"MINGW\" was never defined.
+ as_fn_error $? "conditional \"MINGW\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${OSX_TRUE}" && test -z "${OSX_FALSE}"; then
- as_fn_error "conditional \"OSX\" was never defined.
+ as_fn_error $? "conditional \"OSX\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${WITH_CPU_PROFILER_TRUE}" && test -z "${WITH_CPU_PROFILER_FALSE}"; then
- as_fn_error "conditional \"WITH_CPU_PROFILER\" was never defined.
+ as_fn_error $? "conditional \"WITH_CPU_PROFILER\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${WITH_HEAP_PROFILER_TRUE}" && test -z "${WITH_HEAP_PROFILER_FALSE}"; then
- as_fn_error "conditional \"WITH_HEAP_PROFILER\" was never defined.
+ as_fn_error $? "conditional \"WITH_HEAP_PROFILER\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${WITH_HEAP_CHECKER_TRUE}" && test -z "${WITH_HEAP_CHECKER_FALSE}"; then
- as_fn_error "conditional \"WITH_HEAP_CHECKER\" was never defined.
+ as_fn_error $? "conditional \"WITH_HEAP_CHECKER\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${WITH_DEBUGALLOC_TRUE}" && test -z "${WITH_DEBUGALLOC_FALSE}"; then
- as_fn_error "conditional \"WITH_DEBUGALLOC\" was never defined.
+ as_fn_error $? "conditional \"WITH_DEBUGALLOC\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${WITH_HEAP_PROFILER_OR_CHECKER_TRUE}" && test -z "${WITH_HEAP_PROFILER_OR_CHECKER_FALSE}"; then
- as_fn_error "conditional \"WITH_HEAP_PROFILER_OR_CHECKER\" was never defined.
+ as_fn_error $? "conditional \"WITH_HEAP_PROFILER_OR_CHECKER\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${WITH_STACK_TRACE_TRUE}" && test -z "${WITH_STACK_TRACE_FALSE}"; then
- as_fn_error "conditional \"WITH_STACK_TRACE\" was never defined.
+ as_fn_error $? "conditional \"WITH_STACK_TRACE\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
-: ${CONFIG_STATUS=./config.status}
+: "${CONFIG_STATUS=./config.status}"
ac_write_fail=0
ac_clean_files_save=$ac_clean_files
ac_clean_files="$ac_clean_files $CONFIG_STATUS"
@@ -17463,6 +17597,7 @@
IFS=" "" $as_nl"
# Find who we are. Look in the path if we contain no directory separator.
+as_myself=
case $0 in #((
*[\\/]* ) as_myself=$0 ;;
*) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -17508,19 +17643,19 @@
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-# as_fn_error ERROR [LINENO LOG_FD]
-# ---------------------------------
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
-# script with status $?, using 1 if that was 0.
+# script with STATUS, using 1 if that was 0.
as_fn_error ()
{
- as_status=$?; test $as_status -eq 0 && as_status=1
- if test "$3"; then
- as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
+ as_status=$1; test $as_status -eq 0 && as_status=1
+ if test "$4"; then
+ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
fi
- $as_echo "$as_me: error: $1" >&2
+ $as_echo "$as_me: error: $2" >&2
as_fn_exit $as_status
} # as_fn_error
@@ -17716,7 +17851,7 @@
test -d "$as_dir" && break
done
test -z "$as_dirs" || eval "mkdir $as_dirs"
- } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
+ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
} # as_fn_mkdir_p
@@ -17770,7 +17905,7 @@
# values after options handling.
ac_log="
This file was extended by gperftools $as_me 2.0, which was
-generated by GNU Autoconf 2.65. Invocation command line was
+generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
CONFIG_HEADERS = $CONFIG_HEADERS
@@ -17836,10 +17971,10 @@
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
gperftools config.status 2.0
-configured by $0, generated by GNU Autoconf 2.65,
+configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
-Copyright (C) 2009 Free Software Foundation, Inc.
+Copyright (C) 2010 Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it."
@@ -17857,11 +17992,16 @@
while test $# != 0
do
case $1 in
- --*=*)
+ --*=?*)
ac_option=`expr "X$1" : 'X\([^=]*\)='`
ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
ac_shift=:
;;
+ --*=)
+ ac_option=`expr "X$1" : 'X\([^=]*\)='`
+ ac_optarg=
+ ac_shift=:
+ ;;
*)
ac_option=$1
ac_optarg=$2
@@ -17883,6 +18023,7 @@
$ac_shift
case $ac_optarg in
*\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ '') as_fn_error $? "missing file argument" ;;
esac
as_fn_append CONFIG_FILES " '$ac_optarg'"
ac_need_defaults=false;;
@@ -17895,7 +18036,7 @@
ac_need_defaults=false;;
--he | --h)
# Conflict between --help and --header
- as_fn_error "ambiguous option: \`$1'
+ as_fn_error $? "ambiguous option: \`$1'
Try \`$0 --help' for more information.";;
--help | --hel | -h )
$as_echo "$ac_cs_usage"; exit ;;
@@ -17904,7 +18045,7 @@
ac_cs_silent=: ;;
# This is an error.
- -*) as_fn_error "unrecognized option: \`$1'
+ -*) as_fn_error $? "unrecognized option: \`$1'
Try \`$0 --help' for more information." ;;
*) as_fn_append ac_config_targets " $1"
@@ -18316,7 +18457,7 @@
"src/gperftools/tcmalloc.h") CONFIG_FILES="$CONFIG_FILES src/gperftools/tcmalloc.h" ;;
"src/windows/gperftools/tcmalloc.h") CONFIG_FILES="$CONFIG_FILES src/windows/gperftools/tcmalloc.h" ;;
- *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
+ *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
esac
done
@@ -18339,9 +18480,10 @@
# after its creation but before its name has been assigned to `$tmp'.
$debug ||
{
- tmp=
+ tmp= ac_tmp=
trap 'exit_status=$?
- { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
+ : "${ac_tmp:=$tmp}"
+ { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
' 0
trap 'as_fn_exit 1' 1 2 13 15
}
@@ -18349,12 +18491,13 @@
{
tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
- test -n "$tmp" && test -d "$tmp"
+ test -d "$tmp"
} ||
{
tmp=./conf$$-$RANDOM
(umask 077 && mkdir "$tmp")
-} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
+} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
+ac_tmp=$tmp
# Set up the scripts for CONFIG_FILES section.
# No need to generate them if there are no CONFIG_FILES.
@@ -18371,12 +18514,12 @@
fi
ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
- ac_cs_awk_cr='\r'
+ ac_cs_awk_cr='\\r'
else
ac_cs_awk_cr=$ac_cr
fi
-echo 'BEGIN {' >"$tmp/subs1.awk" &&
+echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
_ACEOF
@@ -18385,18 +18528,18 @@
echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
echo "_ACEOF"
} >conf$$subs.sh ||
- as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
-ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
ac_delim='%!_!# '
for ac_last_try in false false false false false :; do
. ./conf$$subs.sh ||
- as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
if test $ac_delim_n = $ac_delim_num; then
break
elif $ac_last_try; then
- as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
else
ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
fi
@@ -18404,7 +18547,7 @@
rm -f conf$$subs.sh
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
+cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
_ACEOF
sed -n '
h
@@ -18452,7 +18595,7 @@
rm -f conf$$subs.awk
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
_ACAWK
-cat >>"\$tmp/subs1.awk" <<_ACAWK &&
+cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
for (key in S) S_is_set[key] = 1
FS = ""
@@ -18484,21 +18627,29 @@
sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
else
cat
-fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
- || as_fn_error "could not setup config files machinery" "$LINENO" 5
+fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
+ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
_ACEOF
-# VPATH may cause trouble with some makes, so we remove $(srcdir),
-# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
+# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
+# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
# trailing colons and then remove the whole line if VPATH becomes empty
# (actually we leave an empty line to preserve line numbers).
if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=/{
-s/:*\$(srcdir):*/:/
-s/:*\${srcdir}:*/:/
-s/:*@srcdir@:*/:/
-s/^\([^=]*=[ ]*\):*/\1/
+ ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
+h
+s///
+s/^/:/
+s/[ ]*$/:/
+s/:\$(srcdir):/:/g
+s/:\${srcdir}:/:/g
+s/:@srcdir@:/:/g
+s/^:*//
s/:*$//
+x
+s/\(=[ ]*\).*/\1/
+G
+s/\n//
s/^[^=]*=[ ]*$//
}'
fi
@@ -18510,7 +18661,7 @@
# No need to generate them if there are no CONFIG_HEADERS.
# This happens for instance with `./config.status Makefile'.
if test -n "$CONFIG_HEADERS"; then
-cat >"$tmp/defines.awk" <<\_ACAWK ||
+cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
BEGIN {
_ACEOF
@@ -18522,11 +18673,11 @@
# handling of long lines.
ac_delim='%!_!# '
for ac_last_try in false false :; do
- ac_t=`sed -n "/$ac_delim/p" confdefs.h`
- if test -z "$ac_t"; then
+ ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
+ if test -z "$ac_tt"; then
break
elif $ac_last_try; then
- as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
+ as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
else
ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
fi
@@ -18611,7 +18762,7 @@
_ACAWK
_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
- as_fn_error "could not setup config headers machinery" "$LINENO" 5
+ as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
fi # test -n "$CONFIG_HEADERS"
@@ -18624,7 +18775,7 @@
esac
case $ac_mode$ac_tag in
:[FHL]*:*);;
- :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
+ :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
:[FH]-) ac_tag=-:-;;
:[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
esac
@@ -18643,7 +18794,7 @@
for ac_f
do
case $ac_f in
- -) ac_f="$tmp/stdin";;
+ -) ac_f="$ac_tmp/stdin";;
*) # Look for the file first in the build tree, then in the source tree
# (if the path is not absolute). The absolute path cannot be DOS-style,
# because $ac_f cannot contain `:'.
@@ -18652,7 +18803,7 @@
[\\/$]*) false;;
*) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
esac ||
- as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
+ as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
esac
case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
as_fn_append ac_file_inputs " '$ac_f'"
@@ -18678,8 +18829,8 @@
esac
case $ac_tag in
- *:-:* | *:-) cat >"$tmp/stdin" \
- || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
+ *:-:* | *:-) cat >"$ac_tmp/stdin" \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
esac
;;
esac
@@ -18815,23 +18966,24 @@
s&@MKDIR_P@&$ac_MKDIR_P&;t t
$ac_datarootdir_hack
"
-eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
- || as_fn_error "could not create $ac_file" "$LINENO" 5
+eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
+ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
- { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
- { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
+ { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
+ { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
+ "$ac_tmp/out"`; test -z "$ac_out"; } &&
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
-which seems to be undefined. Please make sure it is defined." >&5
+which seems to be undefined. Please make sure it is defined" >&5
$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
-which seems to be undefined. Please make sure it is defined." >&2;}
+which seems to be undefined. Please make sure it is defined" >&2;}
- rm -f "$tmp/stdin"
+ rm -f "$ac_tmp/stdin"
case $ac_file in
- -) cat "$tmp/out" && rm -f "$tmp/out";;
- *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
+ -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
+ *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
esac \
- || as_fn_error "could not create $ac_file" "$LINENO" 5
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
;;
:H)
#
@@ -18840,21 +18992,21 @@
if test x"$ac_file" != x-; then
{
$as_echo "/* $configure_input */" \
- && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
- } >"$tmp/config.h" \
- || as_fn_error "could not create $ac_file" "$LINENO" 5
- if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
+ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
+ } >"$ac_tmp/config.h" \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+ if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
$as_echo "$as_me: $ac_file is unchanged" >&6;}
else
rm -f "$ac_file"
- mv "$tmp/config.h" "$ac_file" \
- || as_fn_error "could not create $ac_file" "$LINENO" 5
+ mv "$ac_tmp/config.h" "$ac_file" \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
fi
else
$as_echo "/* $configure_input */" \
- && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
- || as_fn_error "could not create -" "$LINENO" 5
+ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
+ || as_fn_error $? "could not create -" "$LINENO" 5
fi
# Compute "$ac_file"'s index in $config_headers.
_am_arg="$ac_file"
@@ -18899,18 +19051,28 @@
case $ac_file$ac_mode in
- "depfiles":C) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do
- # Strip MF so we end up with the name of the file.
- mf=`echo "$mf" | sed -e 's/:.*$//'`
- # Check whether this is an Automake generated Makefile or not.
- # We used to match only the files named `Makefile.in', but
- # some people rename them; so instead we look at the file content.
- # Grep'ing the first line is not enough: some people post-process
- # each Makefile.in and add a new line on top of each file to say so.
- # Grep'ing the whole file is not good either: AIX grep has a line
- # limit of 2048, but all sed's we know have understand at least 4000.
- if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
- dirpart=`$as_dirname -- "$mf" ||
+ "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
+ # Autoconf 2.62 quotes --file arguments for eval, but not when files
+ # are listed without --file. Let's play safe and only enable the eval
+ # if we detect the quoting.
+ case $CONFIG_FILES in
+ *\'*) eval set x "$CONFIG_FILES" ;;
+ *) set x $CONFIG_FILES ;;
+ esac
+ shift
+ for mf
+ do
+ # Strip MF so we end up with the name of the file.
+ mf=`echo "$mf" | sed -e 's/:.*$//'`
+ # Check whether this is an Automake generated Makefile or not.
+ # We used to match only the files named `Makefile.in', but
+ # some people rename them; so instead we look at the file content.
+ # Grep'ing the first line is not enough: some people post-process
+ # each Makefile.in and add a new line on top of each file to say so.
+ # Grep'ing the whole file is not good either: AIX grep has a line
+ # limit of 2048, but all sed's we know have understand at least 4000.
+ if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+ dirpart=`$as_dirname -- "$mf" ||
$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$mf" : 'X\(//\)[^/]' \| \
X"$mf" : 'X\(//\)$' \| \
@@ -18933,28 +19095,28 @@
q
}
s/.*/./; q'`
- else
- continue
- fi
- # Extract the definition of DEPDIR, am__include, and am__quote
- # from the Makefile without running `make'.
- DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
- test -z "$DEPDIR" && continue
- am__include=`sed -n 's/^am__include = //p' < "$mf"`
- test -z "am__include" && continue
- am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
- # When using ansi2knr, U may be empty or an underscore; expand it
- U=`sed -n 's/^U = //p' < "$mf"`
- # Find all dependency output files, they are included files with
- # $(DEPDIR) in their names. We invoke sed twice because it is the
- # simplest approach to changing $(DEPDIR) to its actual value in the
- # expansion.
- for file in `sed -n "
- s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
- sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
- # Make sure the directory exists.
- test -f "$dirpart/$file" && continue
- fdir=`$as_dirname -- "$file" ||
+ else
+ continue
+ fi
+ # Extract the definition of DEPDIR, am__include, and am__quote
+ # from the Makefile without running `make'.
+ DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+ test -z "$DEPDIR" && continue
+ am__include=`sed -n 's/^am__include = //p' < "$mf"`
+ test -z "am__include" && continue
+ am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+ # When using ansi2knr, U may be empty or an underscore; expand it
+ U=`sed -n 's/^U = //p' < "$mf"`
+ # Find all dependency output files, they are included files with
+ # $(DEPDIR) in their names. We invoke sed twice because it is the
+ # simplest approach to changing $(DEPDIR) to its actual value in the
+ # expansion.
+ for file in `sed -n "
+ s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+ # Make sure the directory exists.
+ test -f "$dirpart/$file" && continue
+ fdir=`$as_dirname -- "$file" ||
$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$file" : 'X\(//\)[^/]' \| \
X"$file" : 'X\(//\)$' \| \
@@ -18977,11 +19139,12 @@
q
}
s/.*/./; q'`
- as_dir=$dirpart/$fdir; as_fn_mkdir_p
- # echo "creating $dirpart/$file"
- echo '# dummy' > "$dirpart/$file"
+ as_dir=$dirpart/$fdir; as_fn_mkdir_p
+ # echo "creating $dirpart/$file"
+ echo '# dummy' > "$dirpart/$file"
+ done
done
-done
+}
;;
"libtool":C)
@@ -19795,7 +19958,7 @@
ac_clean_files=$ac_clean_files_save
test $ac_write_fail = 0 ||
- as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
+ as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
# configure is writing to config.log, and then calls config.status.
@@ -19816,7 +19979,7 @@
exec 5>>config.log
# Use ||, not &&, to avoid exiting from the if with $? = 1, which
# would make configure fail if this is the last instruction.
- $ac_cs_success || as_fn_exit $?
+ $ac_cs_success || as_fn_exit 1
fi
if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
diff -urP gperftools-2.0/configure.ac /home/spot/gperftools/configure.ac
--- gperftools-2.0/configure.ac 2012-02-03 14:37:01.000000000 -0500
+++ /home/spot/gperftools/configure.ac 2013-03-01 14:25:39.084366811 -0500
@@ -2,9 +2,9 @@
## In general, the safest way to proceed is to run ./autogen.sh
# make sure we're interpreted by some minimal autoconf
-AC_PREREQ(2.57)
+AC_PREREQ([2.68])
-AC_INIT(gperftools, 2.0, google-perftools@googlegroups.com)
+AC_INIT([gperftools],[2.0],[google-perftools@googlegroups.com])
# Update this value for every release! (A:B:C will map to foo.so.(A-C).C.B)
# http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
TCMALLOC_SO_VERSION=5:0:1
@@ -19,7 +19,7 @@
AC_CONFIG_MACRO_DIR([m4])
AC_CANONICAL_HOST
AM_INIT_AUTOMAKE([dist-zip])
-AM_CONFIG_HEADER(src/config.h)
+AC_CONFIG_HEADERS([src/config.h])
# Export the version information (for tc_version and friends)
TC_VERSION_MAJOR=`expr "$PACKAGE_VERSION" : '\([[0-9]]*\)'`
@@ -92,7 +92,7 @@
AC_CHECK_TOOL([OBJCOPY], [objcopy], [])
AS_IF([test -n "$OBJCOPY"], [dnl
AC_CACHE_CHECK([if $OBJCOPY supports -W], gpt_cv_objcopy_weaken, [dnl
- AC_LINK_IFELSE([void foo() {} int main() {return 0;}], [dnl
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([void foo() {} int main() {return 0;}])], [dnl
AS_IF(["$OBJCOPY" -W foo conftest$ac_exeext /dev/null],
[gpt_cv_objcopy_weaken=yes], [gpt_cv_objcopy_weaken=no])],
[gpt_cv_objcopy_weaken=no])])],
@@ -105,14 +105,20 @@
# around the executables it builds. Such scripts have caused failures on
# MinGW. Using this option means an extra link step is executed during
# "make install".
- AC_DISABLE_FAST_INSTALL
+ _LT_SET_OPTION([LT_INIT],[disable-fast-install])
+AC_DIAGNOSE([obsolete],[AC_DISABLE_FAST_INSTALL: Remove this warning and the call to _LT_SET_OPTION when you put
+the `disable-fast-install' option into LT_INIT's first parameter.])
+
;;
*)
- AC_ENABLE_FAST_INSTALL
+ _LT_SET_OPTION([LT_INIT],[fast-install])
+AC_DIAGNOSE([obsolete],[AC_ENABLE_FAST_INSTALL: Remove this warning and the call to _LT_SET_OPTION when you put
+the `fast-install' option into LT_INIT's first parameter.])
+
;;
esac
-AC_PROG_LIBTOOL
+LT_INIT
AC_SUBST(LIBTOOL_DEPS)
AM_CONDITIONAL(USE_LIBTOOL, test "x$LIBTOOL" != "x")
@@ -182,19 +188,22 @@
AC_DEFINE(HAVE_MMAP, 1,
[Define to 1 if you have a working `mmap' system call.])
;;
- *) AC_FUNC_MMAP
+ *) if test "$cross_compiling" = yes; then
+ ac_cv_func_mmap_fixed_mapped=yes
+ AC_DEFINE(HAVE_MMAP, 1,
+ [Define to 1 if you have a working `mmap' system call.])
+ else
+ AC_FUNC_MMAP
+ fi
;;
esac
# If AtomicWord != Atomic32, we need to define two versions of all the
# atomicops functions. If they're the same, we want to define only one.
AC_MSG_CHECKING([if int32_t is the same type as intptr_t])
-AC_TRY_COMPILE([#include <stdint.h>],
- [int32_t v1 = 0; intptr_t v2 = 0; return (&v1 - &v2)],
- [AC_DEFINE(INT32_EQUALS_INTPTR, 1,
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdint.h>]], [[int32_t v1 = 0; intptr_t v2 = 0; return (&v1 - &v2)]])],[AC_DEFINE(INT32_EQUALS_INTPTR, 1,
Define to 1 if int32_t is equivalent to intptr_t)
- AC_MSG_RESULT([yes])],
- [AC_MSG_RESULT([no])])
+ AC_MSG_RESULT([yes])],[AC_MSG_RESULT([no])])
# We want to access the "PC" (Program Counter) register from a struct
# ucontext. Every system has its own way of doing that. We try all the
@@ -214,16 +223,14 @@
AC_CHECK_LIB(unwind, backtrace, UNWIND_LIBS=-lunwind, UNWIND_LIBS=)
AC_SUBST(UNWIND_LIBS)
-# On x86_64, instead of libunwind, we can choose to compile with frame-pointers
-# (This isn't needed on i386, where -fno-omit-frame-pointer is the default).
+# On x86_64, instead of libunwind, we can choose to compile with frame-pointers.
AC_ARG_ENABLE(frame_pointers,
AS_HELP_STRING([--enable-frame-pointers],
[On x86_64 systems, compile with -fno-omit-frame-pointer (see INSTALL)]),
, enable_frame_pointers=no)
AM_CONDITIONAL(ENABLE_FRAME_POINTERS, test "$enable_frame_pointers" = yes)
-# Some x86_64 systems do not insert frame pointers by default (all
-# i386 systems that I know of, do. I don't know about non-x86 chips).
+# Some x86_64 systems do not insert frame pointers by default.
# We want to see if the current system is one of those.
AC_COMPILE_IFELSE([AC_LANG_PROGRAM(, [return __x86_64__ == 1 ? 0 : 1])],
[is_x86_64=yes], [is_x86_64=no])
@@ -282,6 +289,14 @@
AC_MSG_RESULT([yes])],
[AC_MSG_RESULT([no])])
+# Check for __builtin_expect()
+AC_MSG_CHECKING([for __builtin_expect()])
+AC_LINK_IFELSE([AC_LANG_PROGRAM(, return __builtin_expect(main != 0, 1))],
+ [AC_DEFINE(HAVE_BUILTIN_EXPECT, 1,
+ Define to 1 if compiler supports __builtin_expect)
+ AC_MSG_RESULT([yes])],
+ [AC_MSG_RESULT([no])])
+
# Check if __environ is available (for GetenvBeforeMain)
AC_MSG_CHECKING([for __environ])
AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <unistd.h>],
diff -urP gperftools-2.0/doc/cpuprofile.html /home/spot/gperftools/doc/cpuprofile.html
--- gperftools-2.0/doc/cpuprofile.html 2012-02-03 14:18:22.000000000 -0500
+++ /home/spot/gperftools/doc/cpuprofile.html 2013-03-01 14:25:39.088366811 -0500
@@ -54,12 +54,27 @@
<code>/bin/ls</code> that had been linked against libprofiler,
you could run:</p>
<pre>% env CPUPROFILE=ls.prof /bin/ls</pre>
-
+ </li>
+ <li> <p>In addition to defining the environment variable CPUPROFILE
+ you can also define CPUPROFILESIGNAL. This allows profiling to be
+ controlled via the signal number that you specify. The signal number
+ must be unused by the program under normal operation. Internally it
+ acts as a switch, triggered by the signal, which is off by default.
+ For instance, if you had a copy of <code>/bin/chrome</code> that had been
+ been linked against libprofiler, you could run:</p>
+ <pre>% env CPUPROFILE=chrome.prof CPUPROFILESIGNAL=12 /bin/chrome &</pre>
+ <p>You can then trigger profiling to start:</p>
+ <pre>% killall -12 chrome</pre>
+ <p>Then after a period of time you can tell it to stop which will
+ generate the profile:</p>
+ <pre>% killall -12 chrome</pre>
+ </li>
<li> <p>In your code, bracket the code you want profiled in calls to
<code>ProfilerStart()</code> and <code>ProfilerStop()</code>.
(These functions are declared in <code>&lt;gperftools/profiler.h&gt;</code>.)
<code>ProfilerStart()</code> will take
the profile-filename as an argument.</p>
+ </li>
</ol>
<p>In Linux 2.6 and above, profiling works correctly with threads,
diff -urP gperftools-2.0/doc/heapprofile.html /home/spot/gperftools/doc/heapprofile.html
--- gperftools-2.0/doc/heapprofile.html 2012-02-03 14:18:22.000000000 -0500
+++ /home/spot/gperftools/doc/heapprofile.html 2013-03-01 14:25:39.086366811 -0500
@@ -91,7 +91,7 @@
<td><code>HEAP_PROFILE_ALLOCATION_INTERVAL</code></td>
<td>default: 1073741824 (1 Gb)</td>
<td>
- Dump heap profiling information once every specified number of
+ Dump heap profiling information each time the specified number of
bytes has been allocated by the program.
</td>
</tr>
@@ -106,6 +106,15 @@
</tr>
<tr valign=top>
+ <td><code>HEAP_PROFILE_TIME_INTERVAL</code></td>
+ <td>default: 104857600 (100 Mb)</td>
+ <td>
+ Dump heap profiling information each time the specified
+ number of seconds has elapsed.
+ </td>
+</tr>
+
+<tr valign=top>
<td><code>HEAP_PROFILE_MMAP</code></td>
<td>default: false</td>
<td>
@@ -122,7 +131,7 @@
</tr>
<tr valign=top>
- <td><code>HEAP_PROFILE_MMAP_ONLY</code></td>
+ <td><code>HEAP_PROFILE_ONLY_MMAP</code></td>
<td>default: false</td>
<td>
Only profile <code>mmap</code>, <code>mremap</code>, and <code>sbrk</code>
diff -urP gperftools-2.0/doc/pprof.see_also /home/spot/gperftools/doc/pprof.see_also
--- gperftools-2.0/doc/pprof.see_also 1969-12-31 19:00:00.000000000 -0500
+++ /home/spot/gperftools/doc/pprof.see_also 2013-03-01 14:25:39.089366811 -0500
@@ -0,0 +1,11 @@
+[see also]
+Further documentation for
+.B pprof
+is maintained as a web page called
+.B cpu_profiler.html
+and is likely installed at one of the following locations:
+.IP
+.B /usr/share/gperftools/cpu_profiler.html
+.br
+.B /usr/local/share/gperftools/cpu_profiler.html
+.PP
Only in gperftools-2.0: libtool
diff -urP gperftools-2.0/m4/libtool.m4 /home/spot/gperftools/m4/libtool.m4
--- gperftools-2.0/m4/libtool.m4 2010-11-05 18:21:23.000000000 -0400
+++ /home/spot/gperftools/m4/libtool.m4 2013-03-01 14:25:37.807366857 -0500
@@ -1021,7 +1021,7 @@
# to the aix ld manual.
m4_defun([_LT_SYS_MODULE_PATH_AIX],
[m4_require([_LT_DECL_SED])dnl
-AC_LINK_IFELSE(AC_LANG_PROGRAM,[
+AC_LINK_IFELSE([AC_LANG_PROGRAM],[
lt_aix_libpath_sed='
/Import File Strings/,/^$/ {
/^0/ {
@@ -4846,7 +4846,7 @@
# implicitly export all symbols.
save_LDFLAGS="$LDFLAGS"
LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
- AC_LINK_IFELSE(int foo(void) {},
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([int foo(void) {}])],
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
)
LDFLAGS="$save_LDFLAGS"
diff -urP gperftools-2.0/Makefile.am /home/spot/gperftools/Makefile.am
--- gperftools-2.0/Makefile.am 2012-02-03 14:32:08.000000000 -0500
+++ /home/spot/gperftools/Makefile.am 2013-03-01 14:25:39.163366809 -0500
@@ -29,10 +29,15 @@
-fno-builtin-calloc -fno-builtin-cfree \
-fno-builtin-memalign -fno-builtin-posix_memalign \
-fno-builtin-valloc -fno-builtin-pvalloc
+
# On i386, -mmmx is needed for the mmx-based instructions in
-# atomicops-internal-x86.h.
+# atomicops-internal-x86.h. Also as of gcc 4.6, -fomit-frame-pointer
+# is the default. Since we must always have frame pointers for I386
+# in order to generate backtraces we now specify -fno-omit-frame-pointer
+# by default.
if I386
AM_CXXFLAGS += -mmmx
+AM_CXXFLAGS += -fno-omit-frame-pointer
endif I386
endif GCC
if HAVE_W_NO_UNUSED_RESULT
@@ -121,8 +126,7 @@
src/google/malloc_hook_c.h \
src/google/profiler.h \
src/google/stacktrace.h \
- src/google/tcmalloc.h \
- src/windows/google/tcmalloc.h
+ src/google/tcmalloc.h
docdir = $(prefix)/share/doc/$(PACKAGE)-$(VERSION)
# This is for HTML and other documentation you want to install.
@@ -432,9 +436,8 @@
SG_TCMALLOC_MINIMAL_INCLUDES = src/gperftools/malloc_hook.h \
src/gperftools/malloc_hook_c.h \
src/gperftools/malloc_extension.h \
- src/gperftools/malloc_extension_c.h \
- src/gperftools/stacktrace.h
-TCMALLOC_MINIMAL_INCLUDES = $(S_TCMALLOC_MINIMAL_INCLUDES) $(SG_TCMALLOC_MINIMAL_INCLUDES)
+ src/gperftools/malloc_extension_c.h
+TCMALLOC_MINIMAL_INCLUDES = $(S_TCMALLOC_MINIMAL_INCLUDES) $(SG_TCMALLOC_MINIMAL_INCLUDES) $(SG_STACKTRACE_INCLUDES)
perftoolsinclude_HEADERS += $(SG_TCMALLOC_MINIMAL_INCLUDES)
### Making the library
@@ -842,10 +845,10 @@
src/base/sysinfo.h \
src/base/thread_lister.h \
src/heap-profile-table.h
-SG_TCMALLOC_INCLUDES = $(SG_TCMALLOC_MINIMAL_INCLUDES) \
- src/gperftools/heap-profiler.h \
+SG_TCMALLOC_INCLUDES = src/gperftools/heap-profiler.h \
src/gperftools/heap-checker.h
-TCMALLOC_INCLUDES = $(S_TCMALLOC_INCLUDES) $(SG_TCMALLOC_INCLUDES)
+TCMALLOC_INCLUDES = $(S_TCMALLOC_INCLUDES) $(SG_TCMALLOC_MINIMAL_INCLUDES) \
+ $(SG_TCMALLOC_INCLUDES) $(SG_STACKTRACE_INCLUDES)
perftoolsinclude_HEADERS += $(SG_TCMALLOC_INCLUDES)
### Making the library
@@ -1186,9 +1189,9 @@
src/base/sysinfo.h \
$(SPINLOCK_INCLUDES) \
$(LOGGING_INCLUDES)
-SG_CPU_PROFILER_INCLUDES = src/gperftools/profiler.h \
- src/gperftools/stacktrace.h
-CPU_PROFILER_INCLUDES = $(S_CPU_PROFILER_INCLUDES) $(SG_CPU_PROFILER_INCLUDES)
+SG_CPU_PROFILER_INCLUDES = src/gperftools/profiler.h
+CPU_PROFILER_INCLUDES = $(S_CPU_PROFILER_INCLUDES) $(SG_CPU_PROFILER_INCLUDES) \
+ $(SG_STACKTRACE_INCLUDES)
perftoolsinclude_HEADERS += $(SG_CPU_PROFILER_INCLUDES)
### Making the library
diff -urP gperftools-2.0/Makefile.in /home/spot/gperftools/Makefile.in
--- gperftools-2.0/Makefile.in 2012-02-03 14:39:18.000000000 -0500
+++ /home/spot/gperftools/Makefile.in 2013-03-01 14:25:37.963366851 -0500
@@ -1,8 +1,9 @@
-# Makefile.in generated by automake 1.10.1 from Makefile.am.
+# Makefile.in generated by automake 1.10.3 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -54,9 +55,13 @@
@GCC_TRUE@ -fno-builtin-memalign -fno-builtin-posix_memalign \
@GCC_TRUE@ -fno-builtin-valloc -fno-builtin-pvalloc
+
# On i386, -mmmx is needed for the mmx-based instructions in
-# atomicops-internal-x86.h.
-@GCC_TRUE@@I386_TRUE@am__append_3 = -mmmx
+# atomicops-internal-x86.h. Also as of gcc 4.6, -fomit-frame-pointer
+# is the default. Since we must always have frame pointers for I386
+# in order to generate backtraces we now specify -fno-omit-frame-pointer
+# by default.
+@GCC_TRUE@@I386_TRUE@am__append_3 = -mmmx -fno-omit-frame-pointer
@HAVE_W_NO_UNUSED_RESULT_TRUE@am__append_4 = -Wno-unused-result
# These are x86-specific, having to do with frame-pointers. In
@@ -344,7 +349,7 @@
@WITH_CPU_PROFILER_TRUE@am__objects_2 = $(am__objects_1) \
@WITH_CPU_PROFILER_TRUE@ $(am__objects_1)
@WITH_CPU_PROFILER_TRUE@am__objects_3 = $(am__objects_2) \
-@WITH_CPU_PROFILER_TRUE@ $(am__objects_1)
+@WITH_CPU_PROFILER_TRUE@ $(am__objects_1) $(am__objects_1)
@WITH_CPU_PROFILER_TRUE@am_libprofiler_la_OBJECTS = profiler.lo \
@WITH_CPU_PROFILER_TRUE@ profile-handler.lo profiledata.lo \
@WITH_CPU_PROFILER_TRUE@ $(am__objects_3)
@@ -434,26 +439,27 @@
src/gperftools/malloc_hook.h src/gperftools/malloc_hook_c.h \
src/gperftools/malloc_extension.h \
src/gperftools/malloc_extension_c.h \
- src/gperftools/stacktrace.h src/gperftools/heap-profiler.h \
- src/gperftools/heap-checker.h src/base/thread_lister.c \
+ src/gperftools/heap-profiler.h src/gperftools/heap-checker.h \
+ src/gperftools/stacktrace.h src/base/thread_lister.c \
src/base/linuxthreads.cc src/heap-checker.cc \
src/heap-checker-bcad.cc
@MINGW_FALSE@am__objects_5 = libtcmalloc_la-tcmalloc.lo
am__objects_6 = $(am__objects_1)
@WITH_HEAP_PROFILER_OR_CHECKER_TRUE@am__objects_7 = $(am__objects_6) \
@WITH_HEAP_PROFILER_OR_CHECKER_TRUE@ $(am__objects_1)
-@WITH_HEAP_PROFILER_OR_CHECKER_TRUE@am__objects_8 = $(am__objects_1)
-@WITH_HEAP_PROFILER_OR_CHECKER_TRUE@am__objects_9 = $(am__objects_7) \
-@WITH_HEAP_PROFILER_OR_CHECKER_TRUE@ $(am__objects_8)
-@WITH_HEAP_CHECKER_TRUE@@WITH_HEAP_PROFILER_OR_CHECKER_TRUE@am__objects_10 = thread_lister.lo \
+@WITH_HEAP_PROFILER_OR_CHECKER_TRUE@am__objects_8 = $(am__objects_7) \
+@WITH_HEAP_PROFILER_OR_CHECKER_TRUE@ $(am__objects_1) \
+@WITH_HEAP_PROFILER_OR_CHECKER_TRUE@ $(am__objects_1) \
+@WITH_HEAP_PROFILER_OR_CHECKER_TRUE@ $(am__objects_1)
+@WITH_HEAP_CHECKER_TRUE@@WITH_HEAP_PROFILER_OR_CHECKER_TRUE@am__objects_9 = thread_lister.lo \
@WITH_HEAP_CHECKER_TRUE@@WITH_HEAP_PROFILER_OR_CHECKER_TRUE@ libtcmalloc_la-linuxthreads.lo \
@WITH_HEAP_CHECKER_TRUE@@WITH_HEAP_PROFILER_OR_CHECKER_TRUE@ libtcmalloc_la-heap-checker.lo \
@WITH_HEAP_CHECKER_TRUE@@WITH_HEAP_PROFILER_OR_CHECKER_TRUE@ libtcmalloc_la-heap-checker-bcad.lo
-@WITH_HEAP_CHECKER_TRUE@@WITH_HEAP_PROFILER_OR_CHECKER_TRUE@am__objects_11 = $(am__objects_10)
+@WITH_HEAP_CHECKER_TRUE@@WITH_HEAP_PROFILER_OR_CHECKER_TRUE@am__objects_10 = $(am__objects_9)
@WITH_HEAP_PROFILER_OR_CHECKER_TRUE@am_libtcmalloc_la_OBJECTS = \
@WITH_HEAP_PROFILER_OR_CHECKER_TRUE@ $(am__objects_5) \
-@WITH_HEAP_PROFILER_OR_CHECKER_TRUE@ $(am__objects_9) \
-@WITH_HEAP_PROFILER_OR_CHECKER_TRUE@ $(am__objects_11)
+@WITH_HEAP_PROFILER_OR_CHECKER_TRUE@ $(am__objects_8) \
+@WITH_HEAP_PROFILER_OR_CHECKER_TRUE@ $(am__objects_10)
libtcmalloc_la_OBJECTS = $(am_libtcmalloc_la_OBJECTS)
libtcmalloc_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CXXLD) \
@@ -497,29 +503,29 @@
src/gperftools/malloc_hook.h src/gperftools/malloc_hook_c.h \
src/gperftools/malloc_extension.h \
src/gperftools/malloc_extension_c.h \
- src/gperftools/stacktrace.h src/gperftools/heap-profiler.h \
- src/gperftools/heap-checker.h src/base/thread_lister.c \
+ src/gperftools/heap-profiler.h src/gperftools/heap-checker.h \
+ src/gperftools/stacktrace.h src/base/thread_lister.c \
src/base/linuxthreads.cc src/heap-checker.cc \
src/heap-checker-bcad.cc src/profiler.cc \
src/profile-handler.cc src/profiledata.cc src/profiledata.h \
src/profile-handler.h src/getpc.h src/base/simple_mutex.h \
src/gperftools/profiler.h
-@MINGW_FALSE@am__objects_12 = libtcmalloc_and_profiler_la-tcmalloc.lo
-@WITH_HEAP_CHECKER_TRUE@@WITH_HEAP_PROFILER_OR_CHECKER_TRUE@am__objects_13 = thread_lister.lo \
+@MINGW_FALSE@am__objects_11 = libtcmalloc_and_profiler_la-tcmalloc.lo
+@WITH_HEAP_CHECKER_TRUE@@WITH_HEAP_PROFILER_OR_CHECKER_TRUE@am__objects_12 = thread_lister.lo \
@WITH_HEAP_CHECKER_TRUE@@WITH_HEAP_PROFILER_OR_CHECKER_TRUE@ libtcmalloc_and_profiler_la-linuxthreads.lo \
@WITH_HEAP_CHECKER_TRUE@@WITH_HEAP_PROFILER_OR_CHECKER_TRUE@ libtcmalloc_and_profiler_la-heap-checker.lo \
@WITH_HEAP_CHECKER_TRUE@@WITH_HEAP_PROFILER_OR_CHECKER_TRUE@ libtcmalloc_and_profiler_la-heap-checker-bcad.lo
-@WITH_HEAP_CHECKER_TRUE@@WITH_HEAP_PROFILER_OR_CHECKER_TRUE@am__objects_14 = $(am__objects_13)
-@WITH_HEAP_PROFILER_OR_CHECKER_TRUE@am__objects_15 = \
-@WITH_HEAP_PROFILER_OR_CHECKER_TRUE@ $(am__objects_12) \
-@WITH_HEAP_PROFILER_OR_CHECKER_TRUE@ $(am__objects_9) \
-@WITH_HEAP_PROFILER_OR_CHECKER_TRUE@ $(am__objects_14)
-@WITH_CPU_PROFILER_TRUE@am__objects_16 = libtcmalloc_and_profiler_la-profiler.lo \
+@WITH_HEAP_CHECKER_TRUE@@WITH_HEAP_PROFILER_OR_CHECKER_TRUE@am__objects_13 = $(am__objects_12)
+@WITH_HEAP_PROFILER_OR_CHECKER_TRUE@am__objects_14 = \
+@WITH_HEAP_PROFILER_OR_CHECKER_TRUE@ $(am__objects_11) \
+@WITH_HEAP_PROFILER_OR_CHECKER_TRUE@ $(am__objects_8) \
+@WITH_HEAP_PROFILER_OR_CHECKER_TRUE@ $(am__objects_13)
+@WITH_CPU_PROFILER_TRUE@am__objects_15 = libtcmalloc_and_profiler_la-profiler.lo \
@WITH_CPU_PROFILER_TRUE@ libtcmalloc_and_profiler_la-profile-handler.lo \
@WITH_CPU_PROFILER_TRUE@ libtcmalloc_and_profiler_la-profiledata.lo \
@WITH_CPU_PROFILER_TRUE@ $(am__objects_3)
-@WITH_CPU_PROFILER_TRUE@@WITH_HEAP_PROFILER_OR_CHECKER_TRUE@am_libtcmalloc_and_profiler_la_OBJECTS = $(am__objects_15) \
-@WITH_CPU_PROFILER_TRUE@@WITH_HEAP_PROFILER_OR_CHECKER_TRUE@ $(am__objects_16)
+@WITH_CPU_PROFILER_TRUE@@WITH_HEAP_PROFILER_OR_CHECKER_TRUE@am_libtcmalloc_and_profiler_la_OBJECTS = $(am__objects_14) \
+@WITH_CPU_PROFILER_TRUE@@WITH_HEAP_PROFILER_OR_CHECKER_TRUE@ $(am__objects_15)
libtcmalloc_and_profiler_la_OBJECTS = \
$(am_libtcmalloc_and_profiler_la_OBJECTS)
libtcmalloc_and_profiler_la_LINK = $(LIBTOOL) --tag=CXX \
@@ -563,15 +569,15 @@
src/gperftools/malloc_hook.h src/gperftools/malloc_hook_c.h \
src/gperftools/malloc_extension.h \
src/gperftools/malloc_extension_c.h \
- src/gperftools/stacktrace.h src/gperftools/heap-profiler.h \
- src/gperftools/heap-checker.h
-@WITH_HEAP_CHECKER_TRUE@@WITH_HEAP_PROFILER_OR_CHECKER_TRUE@am__objects_17 = thread_lister.lo \
+ src/gperftools/heap-profiler.h src/gperftools/heap-checker.h \
+ src/gperftools/stacktrace.h
+@WITH_HEAP_CHECKER_TRUE@@WITH_HEAP_PROFILER_OR_CHECKER_TRUE@am__objects_16 = thread_lister.lo \
@WITH_HEAP_CHECKER_TRUE@@WITH_HEAP_PROFILER_OR_CHECKER_TRUE@ libtcmalloc_debug_la-linuxthreads.lo \
@WITH_HEAP_CHECKER_TRUE@@WITH_HEAP_PROFILER_OR_CHECKER_TRUE@ libtcmalloc_debug_la-heap-checker.lo \
@WITH_HEAP_CHECKER_TRUE@@WITH_HEAP_PROFILER_OR_CHECKER_TRUE@ libtcmalloc_debug_la-heap-checker-bcad.lo
@WITH_DEBUGALLOC_TRUE@@WITH_HEAP_PROFILER_OR_CHECKER_TRUE@am_libtcmalloc_debug_la_OBJECTS = libtcmalloc_debug_la-debugallocation.lo \
-@WITH_DEBUGALLOC_TRUE@@WITH_HEAP_PROFILER_OR_CHECKER_TRUE@ $(am__objects_17) \
-@WITH_DEBUGALLOC_TRUE@@WITH_HEAP_PROFILER_OR_CHECKER_TRUE@ $(am__objects_9)
+@WITH_DEBUGALLOC_TRUE@@WITH_HEAP_PROFILER_OR_CHECKER_TRUE@ $(am__objects_16) \
+@WITH_DEBUGALLOC_TRUE@@WITH_HEAP_PROFILER_OR_CHECKER_TRUE@ $(am__objects_8)
libtcmalloc_debug_la_OBJECTS = $(am_libtcmalloc_debug_la_OBJECTS)
libtcmalloc_debug_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CXXLD) \
@@ -623,12 +629,12 @@
src/gperftools/heap-checker.h src/base/low_level_alloc.cc \
src/heap-profile-table.cc src/heap-profiler.cc \
src/raw_printer.cc src/memory_region_map.cc
-@MINGW_FALSE@am__objects_18 = libtcmalloc_internal_la-system-alloc.lo
-@MINGW_FALSE@am__objects_19 = \
+@MINGW_FALSE@am__objects_17 = libtcmalloc_internal_la-system-alloc.lo
+@MINGW_FALSE@am__objects_18 = \
@MINGW_FALSE@ libtcmalloc_internal_la-maybe_threads.lo
-am__objects_20 = $(am__objects_6) $(am__objects_1)
-am__objects_21 = libtcmalloc_internal_la-common.lo \
- libtcmalloc_internal_la-internal_logging.lo $(am__objects_18) \
+am__objects_19 = $(am__objects_6) $(am__objects_1) $(am__objects_1)
+am__objects_20 = libtcmalloc_internal_la-common.lo \
+ libtcmalloc_internal_la-internal_logging.lo $(am__objects_17) \
libtcmalloc_internal_la-memfs_malloc.lo \
libtcmalloc_internal_la-central_freelist.lo \
libtcmalloc_internal_la-page_heap.lo \
@@ -639,11 +645,11 @@
libtcmalloc_internal_la-symbolize.lo \
libtcmalloc_internal_la-thread_cache.lo \
libtcmalloc_internal_la-malloc_hook.lo \
- libtcmalloc_internal_la-malloc_extension.lo $(am__objects_19) \
- $(am__objects_20)
+ libtcmalloc_internal_la-malloc_extension.lo $(am__objects_18) \
+ $(am__objects_19)
@WITH_HEAP_PROFILER_OR_CHECKER_TRUE@am_libtcmalloc_internal_la_OBJECTS = \
-@WITH_HEAP_PROFILER_OR_CHECKER_TRUE@ $(am__objects_21) \
-@WITH_HEAP_PROFILER_OR_CHECKER_TRUE@ $(am__objects_9) \
+@WITH_HEAP_PROFILER_OR_CHECKER_TRUE@ $(am__objects_20) \
+@WITH_HEAP_PROFILER_OR_CHECKER_TRUE@ $(am__objects_8) \
@WITH_HEAP_PROFILER_OR_CHECKER_TRUE@ libtcmalloc_internal_la-low_level_alloc.lo \
@WITH_HEAP_PROFILER_OR_CHECKER_TRUE@ libtcmalloc_internal_la-heap-profile-table.lo \
@WITH_HEAP_PROFILER_OR_CHECKER_TRUE@ libtcmalloc_internal_la-heap-profiler.lo \
@@ -685,9 +691,9 @@
src/gperftools/malloc_extension.h \
src/gperftools/malloc_extension_c.h \
src/gperftools/stacktrace.h
-@MINGW_FALSE@am__objects_22 = libtcmalloc_minimal_la-tcmalloc.lo
-am_libtcmalloc_minimal_la_OBJECTS = $(am__objects_22) \
- $(am__objects_20)
+@MINGW_FALSE@am__objects_21 = libtcmalloc_minimal_la-tcmalloc.lo
+am_libtcmalloc_minimal_la_OBJECTS = $(am__objects_21) \
+ $(am__objects_19)
libtcmalloc_minimal_la_OBJECTS = $(am_libtcmalloc_minimal_la_OBJECTS)
libtcmalloc_minimal_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CXXLD) \
@@ -725,7 +731,7 @@
src/gperftools/malloc_extension_c.h \
src/gperftools/stacktrace.h
@WITH_DEBUGALLOC_TRUE@am_libtcmalloc_minimal_debug_la_OBJECTS = libtcmalloc_minimal_debug_la-debugallocation.lo \
-@WITH_DEBUGALLOC_TRUE@ $(am__objects_20)
+@WITH_DEBUGALLOC_TRUE@ $(am__objects_19)
libtcmalloc_minimal_debug_la_OBJECTS = \
$(am_libtcmalloc_minimal_debug_la_OBJECTS)
libtcmalloc_minimal_debug_la_LINK = $(LIBTOOL) --tag=CXX \
@@ -768,14 +774,14 @@
src/gperftools/malloc_extension.h \
src/gperftools/malloc_extension_c.h \
src/gperftools/stacktrace.h
-@MINGW_FALSE@am__objects_23 = \
+@MINGW_FALSE@am__objects_22 = \
@MINGW_FALSE@ libtcmalloc_minimal_internal_la-system-alloc.lo
-@MINGW_FALSE@am__objects_24 = \
+@MINGW_FALSE@am__objects_23 = \
@MINGW_FALSE@ libtcmalloc_minimal_internal_la-maybe_threads.lo
am_libtcmalloc_minimal_internal_la_OBJECTS = \
libtcmalloc_minimal_internal_la-common.lo \
libtcmalloc_minimal_internal_la-internal_logging.lo \
- $(am__objects_23) \
+ $(am__objects_22) \
libtcmalloc_minimal_internal_la-memfs_malloc.lo \
libtcmalloc_minimal_internal_la-central_freelist.lo \
libtcmalloc_minimal_internal_la-page_heap.lo \
@@ -787,7 +793,7 @@
libtcmalloc_minimal_internal_la-thread_cache.lo \
libtcmalloc_minimal_internal_la-malloc_hook.lo \
libtcmalloc_minimal_internal_la-malloc_extension.lo \
- $(am__objects_24) $(am__objects_20)
+ $(am__objects_23) $(am__objects_19)
libtcmalloc_minimal_internal_la_OBJECTS = \
$(am_libtcmalloc_minimal_internal_la_OBJECTS)
libtcmalloc_minimal_internal_la_LINK = $(LIBTOOL) --tag=CXX \
@@ -873,10 +879,10 @@
src/base/basictypes.h src/base/dynamic_annotations.h \
src/third_party/valgrind.h src/windows/port.h \
src/windows/port.cc
-@MINGW_TRUE@am__objects_25 = addressmap_unittest-port.$(OBJEXT)
+@MINGW_TRUE@am__objects_24 = addressmap_unittest-port.$(OBJEXT)
am_addressmap_unittest_OBJECTS = \
addressmap_unittest-addressmap_unittest.$(OBJEXT) \
- $(am__objects_6) $(am__objects_25)
+ $(am__objects_6) $(am__objects_24)
addressmap_unittest_OBJECTS = $(am_addressmap_unittest_OBJECTS)
addressmap_unittest_DEPENDENCIES = liblogging.la
addressmap_unittest_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \
@@ -935,10 +941,10 @@
src/base/googleinit.h src/gperftools/heap-checker.h \
src/base/logging.h src/base/basictypes.h \
src/base/dynamic_annotations.h src/third_party/valgrind.h
-@WITH_HEAP_CHECKER_TRUE@am__objects_26 = $(am__objects_1)
-@WITH_HEAP_CHECKER_TRUE@am__objects_27 = heap_checker_debug_unittest-heap-checker_unittest.$(OBJEXT) \
-@WITH_HEAP_CHECKER_TRUE@ $(am__objects_26)
-@WITH_DEBUGALLOC_TRUE@@WITH_HEAP_CHECKER_TRUE@am_heap_checker_debug_unittest_OBJECTS = $(am__objects_27)
+@WITH_HEAP_CHECKER_TRUE@am__objects_25 = $(am__objects_1)
+@WITH_HEAP_CHECKER_TRUE@am__objects_26 = heap_checker_debug_unittest-heap-checker_unittest.$(OBJEXT) \
+@WITH_HEAP_CHECKER_TRUE@ $(am__objects_25)
+@WITH_DEBUGALLOC_TRUE@@WITH_HEAP_CHECKER_TRUE@am_heap_checker_debug_unittest_OBJECTS = $(am__objects_26)
heap_checker_debug_unittest_OBJECTS = \
$(am_heap_checker_debug_unittest_OBJECTS)
@WITH_DEBUGALLOC_TRUE@@WITH_HEAP_CHECKER_TRUE@heap_checker_debug_unittest_DEPENDENCIES = libtcmalloc_debug.la \
@@ -961,7 +967,7 @@
src/base/logging.h src/base/basictypes.h \
src/base/dynamic_annotations.h src/third_party/valgrind.h
@WITH_HEAP_CHECKER_TRUE@am_heap_checker_unittest_OBJECTS = heap_checker_unittest-heap-checker_unittest.$(OBJEXT) \
-@WITH_HEAP_CHECKER_TRUE@ $(am__objects_26)
+@WITH_HEAP_CHECKER_TRUE@ $(am__objects_25)
heap_checker_unittest_OBJECTS = $(am_heap_checker_unittest_OBJECTS)
@WITH_HEAP_CHECKER_TRUE@heap_checker_unittest_DEPENDENCIES = \
@WITH_HEAP_CHECKER_TRUE@ $(LIBTCMALLOC) liblogging.la \
@@ -979,9 +985,9 @@
am__heap_profiler_debug_unittest_SOURCES_DIST = \
src/tests/heap-profiler_unittest.cc src/config_for_unittests.h \
src/gperftools/heap-profiler.h
-@WITH_HEAP_PROFILER_TRUE@am__objects_28 = heap_profiler_debug_unittest-heap-profiler_unittest.$(OBJEXT) \
+@WITH_HEAP_PROFILER_TRUE@am__objects_27 = heap_profiler_debug_unittest-heap-profiler_unittest.$(OBJEXT) \
@WITH_HEAP_PROFILER_TRUE@ $(am__objects_1)
-@WITH_DEBUGALLOC_TRUE@@WITH_HEAP_PROFILER_TRUE@am_heap_profiler_debug_unittest_OBJECTS = $(am__objects_28)
+@WITH_DEBUGALLOC_TRUE@@WITH_HEAP_PROFILER_TRUE@am_heap_profiler_debug_unittest_OBJECTS = $(am__objects_27)
heap_profiler_debug_unittest_OBJECTS = \
$(am_heap_profiler_debug_unittest_OBJECTS)
@WITH_DEBUGALLOC_TRUE@@WITH_HEAP_PROFILER_TRUE@heap_profiler_debug_unittest_DEPENDENCIES = libtcmalloc_debug.la \
@@ -1033,15 +1039,15 @@
src/base/atomicops-internals-arm-v6plus.h src/base/logging.h \
src/base/commandlineflags.h src/base/dynamic_annotations.h \
src/third_party/valgrind.h
-@MINGW_FALSE@am__objects_29 = \
+@MINGW_FALSE@am__objects_28 = \
@MINGW_FALSE@ low_level_alloc_unittest-maybe_threads.$(OBJEXT)
-am__objects_30 = $(am__objects_1) $(am__objects_1)
+am__objects_29 = $(am__objects_1) $(am__objects_1)
am_low_level_alloc_unittest_OBJECTS = \
low_level_alloc_unittest-low_level_alloc.$(OBJEXT) \
low_level_alloc_unittest-malloc_hook.$(OBJEXT) \
- $(am__objects_29) \
+ $(am__objects_28) \
low_level_alloc_unittest-low_level_alloc_unittest.$(OBJEXT) \
- $(am__objects_30)
+ $(am__objects_29)
low_level_alloc_unittest_OBJECTS = \
$(am_low_level_alloc_unittest_OBJECTS)
low_level_alloc_unittest_DEPENDENCIES = $(LIBSPINLOCK)
@@ -1067,10 +1073,10 @@
src/tests/malloc_extension_test.cc src/config_for_unittests.h \
src/base/logging.h src/gperftools/malloc_extension.h \
src/gperftools/malloc_extension_c.h
-am__objects_31 = \
+am__objects_30 = \
malloc_extension_debug_test-malloc_extension_test.$(OBJEXT)
@WITH_DEBUGALLOC_TRUE@am_malloc_extension_debug_test_OBJECTS = \
-@WITH_DEBUGALLOC_TRUE@ $(am__objects_31)
+@WITH_DEBUGALLOC_TRUE@ $(am__objects_30)
malloc_extension_debug_test_OBJECTS = \
$(am_malloc_extension_debug_test_OBJECTS)
@WITH_DEBUGALLOC_TRUE@malloc_extension_debug_test_DEPENDENCIES = \
@@ -1119,9 +1125,9 @@
src/tests/memalign_unittest.cc src/tcmalloc.h \
src/config_for_unittests.h src/tests/testutil.h \
src/tests/testutil.cc
-@MINGW_FALSE@@OSX_FALSE@am__objects_32 = memalign_debug_unittest-memalign_unittest.$(OBJEXT) \
+@MINGW_FALSE@@OSX_FALSE@am__objects_31 = memalign_debug_unittest-memalign_unittest.$(OBJEXT) \
@MINGW_FALSE@@OSX_FALSE@ memalign_debug_unittest-testutil.$(OBJEXT)
-@MINGW_FALSE@@OSX_FALSE@@WITH_DEBUGALLOC_TRUE@am_memalign_debug_unittest_OBJECTS = $(am__objects_32)
+@MINGW_FALSE@@OSX_FALSE@@WITH_DEBUGALLOC_TRUE@am_memalign_debug_unittest_OBJECTS = $(am__objects_31)
memalign_debug_unittest_OBJECTS = \
$(am_memalign_debug_unittest_OBJECTS)
@MINGW_FALSE@@OSX_FALSE@@WITH_DEBUGALLOC_TRUE@memalign_debug_unittest_DEPENDENCIES = libtcmalloc_minimal_debug.la \
@@ -1192,11 +1198,11 @@
am__profiler1_unittest_SOURCES_DIST = src/tests/profiler_unittest.cc \
src/tests/testutil.h src/tests/testutil.cc \
src/config_for_unittests.h src/gperftools/profiler.h
-@WITH_CPU_PROFILER_TRUE@am__objects_33 = profiler1_unittest-profiler_unittest.$(OBJEXT) \
+@WITH_CPU_PROFILER_TRUE@am__objects_32 = profiler1_unittest-profiler_unittest.$(OBJEXT) \
@WITH_CPU_PROFILER_TRUE@ profiler1_unittest-testutil.$(OBJEXT) \
@WITH_CPU_PROFILER_TRUE@ $(am__objects_1)
@WITH_CPU_PROFILER_TRUE@am_profiler1_unittest_OBJECTS = \
-@WITH_CPU_PROFILER_TRUE@ $(am__objects_33)
+@WITH_CPU_PROFILER_TRUE@ $(am__objects_32)
profiler1_unittest_OBJECTS = $(am_profiler1_unittest_OBJECTS)
@WITH_CPU_PROFILER_TRUE@profiler1_unittest_DEPENDENCIES = \
@WITH_CPU_PROFILER_TRUE@ $(LIBPROFILER)
@@ -1207,11 +1213,11 @@
am__profiler2_unittest_SOURCES_DIST = src/tests/profiler_unittest.cc \
src/tests/testutil.h src/tests/testutil.cc \
src/config_for_unittests.h src/gperftools/profiler.h
-@WITH_CPU_PROFILER_TRUE@am__objects_34 = profiler2_unittest-profiler_unittest.$(OBJEXT) \
+@WITH_CPU_PROFILER_TRUE@am__objects_33 = profiler2_unittest-profiler_unittest.$(OBJEXT) \
@WITH_CPU_PROFILER_TRUE@ profiler2_unittest-testutil.$(OBJEXT) \
@WITH_CPU_PROFILER_TRUE@ $(am__objects_1)
@WITH_CPU_PROFILER_TRUE@am_profiler2_unittest_OBJECTS = \
-@WITH_CPU_PROFILER_TRUE@ $(am__objects_34)
+@WITH_CPU_PROFILER_TRUE@ $(am__objects_33)
profiler2_unittest_OBJECTS = $(am_profiler2_unittest_OBJECTS)
profiler2_unittest_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CXXLD) \
@@ -1220,11 +1226,11 @@
am__profiler3_unittest_SOURCES_DIST = src/tests/profiler_unittest.cc \
src/tests/testutil.h src/tests/testutil.cc \
src/config_for_unittests.h src/gperftools/profiler.h
-@WITH_CPU_PROFILER_TRUE@am__objects_35 = profiler3_unittest-profiler_unittest.$(OBJEXT) \
+@WITH_CPU_PROFILER_TRUE@am__objects_34 = profiler3_unittest-profiler_unittest.$(OBJEXT) \
@WITH_CPU_PROFILER_TRUE@ profiler3_unittest-testutil.$(OBJEXT) \
@WITH_CPU_PROFILER_TRUE@ $(am__objects_1)
@WITH_CPU_PROFILER_TRUE@am_profiler3_unittest_OBJECTS = \
-@WITH_CPU_PROFILER_TRUE@ $(am__objects_35)
+@WITH_CPU_PROFILER_TRUE@ $(am__objects_34)
profiler3_unittest_OBJECTS = $(am_profiler3_unittest_OBJECTS)
@WITH_CPU_PROFILER_TRUE@profiler3_unittest_DEPENDENCIES = \
@WITH_CPU_PROFILER_TRUE@ $(LIBPROFILER) $(am__DEPENDENCIES_1)
@@ -1235,11 +1241,11 @@
am__profiler4_unittest_SOURCES_DIST = src/tests/profiler_unittest.cc \
src/tests/testutil.h src/tests/testutil.cc \
src/config_for_unittests.h src/gperftools/profiler.h
-@WITH_CPU_PROFILER_TRUE@am__objects_36 = profiler4_unittest-profiler_unittest.$(OBJEXT) \
+@WITH_CPU_PROFILER_TRUE@am__objects_35 = profiler4_unittest-profiler_unittest.$(OBJEXT) \
@WITH_CPU_PROFILER_TRUE@ profiler4_unittest-testutil.$(OBJEXT) \
@WITH_CPU_PROFILER_TRUE@ $(am__objects_1)
@WITH_CPU_PROFILER_TRUE@am_profiler4_unittest_OBJECTS = \
-@WITH_CPU_PROFILER_TRUE@ $(am__objects_36)
+@WITH_CPU_PROFILER_TRUE@ $(am__objects_35)
profiler4_unittest_OBJECTS = $(am_profiler4_unittest_OBJECTS)
profiler4_unittest_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CXXLD) \
@@ -1263,9 +1269,9 @@
am__realloc_debug_unittest_SOURCES_DIST = \
src/tests/realloc_unittest.cc src/config_for_unittests.h \
src/base/logging.h
-am__objects_37 = realloc_debug_unittest-realloc_unittest.$(OBJEXT)
+am__objects_36 = realloc_debug_unittest-realloc_unittest.$(OBJEXT)
@WITH_DEBUGALLOC_TRUE@am_realloc_debug_unittest_OBJECTS = \
-@WITH_DEBUGALLOC_TRUE@ $(am__objects_37)
+@WITH_DEBUGALLOC_TRUE@ $(am__objects_36)
realloc_debug_unittest_OBJECTS = $(am_realloc_debug_unittest_OBJECTS)
@WITH_DEBUGALLOC_TRUE@realloc_debug_unittest_DEPENDENCIES = \
@WITH_DEBUGALLOC_TRUE@ libtcmalloc_minimal_debug.la \
@@ -1285,8 +1291,8 @@
$(realloc_unittest_LDFLAGS) $(LDFLAGS) -o $@
am__sampler_debug_test_SOURCES_DIST = src/tests/sampler_test.cc \
src/config_for_unittests.h
-@WITH_HEAP_PROFILER_OR_CHECKER_TRUE@am__objects_38 = sampler_debug_test-sampler_test.$(OBJEXT)
-@WITH_DEBUGALLOC_TRUE@@WITH_HEAP_PROFILER_OR_CHECKER_TRUE@am_sampler_debug_test_OBJECTS = $(am__objects_38)
+@WITH_HEAP_PROFILER_OR_CHECKER_TRUE@am__objects_37 = sampler_debug_test-sampler_test.$(OBJEXT)
+@WITH_DEBUGALLOC_TRUE@@WITH_HEAP_PROFILER_OR_CHECKER_TRUE@am_sampler_debug_test_OBJECTS = $(am__objects_37)
sampler_debug_test_OBJECTS = $(am_sampler_debug_test_OBJECTS)
@WITH_DEBUGALLOC_TRUE@@WITH_HEAP_PROFILER_OR_CHECKER_TRUE@sampler_debug_test_DEPENDENCIES = libtcmalloc_debug.la \
@WITH_DEBUGALLOC_TRUE@@WITH_HEAP_PROFILER_OR_CHECKER_TRUE@ $(am__DEPENDENCIES_1)
@@ -1307,9 +1313,9 @@
am__sampling_debug_test_SOURCES_DIST = src/tests/sampling_test.cc \
src/config_for_unittests.h src/base/logging.h \
src/gperftools/malloc_extension.h
-@WITH_HEAP_PROFILER_OR_CHECKER_TRUE@am__objects_39 = sampling_debug_test-sampling_test.$(OBJEXT) \
+@WITH_HEAP_PROFILER_OR_CHECKER_TRUE@am__objects_38 = sampling_debug_test-sampling_test.$(OBJEXT) \
@WITH_HEAP_PROFILER_OR_CHECKER_TRUE@ $(am__objects_1)
-@WITH_DEBUGALLOC_TRUE@@WITH_HEAP_PROFILER_OR_CHECKER_TRUE@am_sampling_debug_test_OBJECTS = $(am__objects_39)
+@WITH_DEBUGALLOC_TRUE@@WITH_HEAP_PROFILER_OR_CHECKER_TRUE@am_sampling_debug_test_OBJECTS = $(am__objects_38)
sampling_debug_test_OBJECTS = $(am_sampling_debug_test_OBJECTS)
@WITH_DEBUGALLOC_TRUE@@WITH_HEAP_PROFILER_OR_CHECKER_TRUE@sampling_debug_test_DEPENDENCIES = libtcmalloc_debug.la \
@WITH_DEBUGALLOC_TRUE@@WITH_HEAP_PROFILER_OR_CHECKER_TRUE@ $(am__DEPENDENCIES_1)
@@ -1342,7 +1348,7 @@
src/google/malloc_extension.h src/google/malloc_extension_c.h \
src/google/malloc_hook.h src/google/malloc_hook_c.h \
src/google/profiler.h src/google/stacktrace.h \
- src/google/tcmalloc.h src/windows/google/tcmalloc.h
+ src/google/tcmalloc.h
@WITH_HEAP_PROFILER_TRUE@am_simple_compat_test_OBJECTS = \
@WITH_HEAP_PROFILER_TRUE@ simple_compat_test.$(OBJEXT) \
@WITH_HEAP_PROFILER_TRUE@ $(am__objects_1)
@@ -1371,11 +1377,11 @@
src/gperftools/stacktrace.h src/base/logging.h \
src/base/basictypes.h src/base/dynamic_annotations.h \
src/third_party/valgrind.h
-@WITH_STACK_TRACE_TRUE@am__objects_40 = $(am__objects_4) \
+@WITH_STACK_TRACE_TRUE@am__objects_39 = $(am__objects_4) \
@WITH_STACK_TRACE_TRUE@ $(am__objects_1)
@WITH_STACK_TRACE_TRUE@am_stacktrace_unittest_OBJECTS = \
@WITH_STACK_TRACE_TRUE@ stacktrace_unittest.$(OBJEXT) \
-@WITH_STACK_TRACE_TRUE@ $(am__objects_40)
+@WITH_STACK_TRACE_TRUE@ $(am__objects_39)
stacktrace_unittest_OBJECTS = $(am_stacktrace_unittest_OBJECTS)
@WITH_STACK_TRACE_TRUE@stacktrace_unittest_DEPENDENCIES = \
@WITH_STACK_TRACE_TRUE@ libstacktrace.la liblogging.la
@@ -1393,10 +1399,10 @@
src/tests/tcmalloc_unittest.cc src/tests/testutil.h \
src/tests/testutil.cc src/config_for_unittests.h \
src/gperftools/malloc_extension.h
-@WITH_HEAP_PROFILER_OR_CHECKER_TRUE@am__objects_41 = tcmalloc_and_profiler_unittest-tcmalloc_unittest.$(OBJEXT) \
+@WITH_HEAP_PROFILER_OR_CHECKER_TRUE@am__objects_40 = tcmalloc_and_profiler_unittest-tcmalloc_unittest.$(OBJEXT) \
@WITH_HEAP_PROFILER_OR_CHECKER_TRUE@ tcmalloc_and_profiler_unittest-testutil.$(OBJEXT) \
@WITH_HEAP_PROFILER_OR_CHECKER_TRUE@ $(am__objects_1)
-@WITH_CPU_PROFILER_TRUE@@WITH_HEAP_PROFILER_OR_CHECKER_TRUE@am_tcmalloc_and_profiler_unittest_OBJECTS = $(am__objects_41)
+@WITH_CPU_PROFILER_TRUE@@WITH_HEAP_PROFILER_OR_CHECKER_TRUE@am_tcmalloc_and_profiler_unittest_OBJECTS = $(am__objects_40)
tcmalloc_and_profiler_unittest_OBJECTS = \
$(am_tcmalloc_and_profiler_unittest_OBJECTS)
@WITH_CPU_PROFILER_TRUE@@WITH_HEAP_PROFILER_OR_CHECKER_TRUE@tcmalloc_and_profiler_unittest_DEPENDENCIES = libtcmalloc_and_profiler.la
@@ -1408,10 +1414,10 @@
src/tests/tcmalloc_unittest.cc src/tests/testutil.h \
src/tests/testutil.cc src/config_for_unittests.h \
src/gperftools/malloc_extension.h
-@WITH_HEAP_PROFILER_OR_CHECKER_TRUE@am__objects_42 = tcmalloc_both_unittest-tcmalloc_unittest.$(OBJEXT) \
+@WITH_HEAP_PROFILER_OR_CHECKER_TRUE@am__objects_41 = tcmalloc_both_unittest-tcmalloc_unittest.$(OBJEXT) \
@WITH_HEAP_PROFILER_OR_CHECKER_TRUE@ tcmalloc_both_unittest-testutil.$(OBJEXT) \
@WITH_HEAP_PROFILER_OR_CHECKER_TRUE@ $(am__objects_1)
-@OSX_FALSE@@WITH_HEAP_PROFILER_OR_CHECKER_TRUE@am_tcmalloc_both_unittest_OBJECTS = $(am__objects_42)
+@OSX_FALSE@@WITH_HEAP_PROFILER_OR_CHECKER_TRUE@am_tcmalloc_both_unittest_OBJECTS = $(am__objects_41)
tcmalloc_both_unittest_OBJECTS = $(am_tcmalloc_both_unittest_OBJECTS)
@WITH_CPU_PROFILER_FALSE@@WITH_HEAP_PROFILER_OR_CHECKER_TRUE@am__DEPENDENCIES_4 = $(LIBTCMALLOC) \
@WITH_CPU_PROFILER_FALSE@@WITH_HEAP_PROFILER_OR_CHECKER_TRUE@ $(LIBTCMALLOC_MINIMAL) \
@@ -1431,10 +1437,10 @@
src/tests/tcmalloc_unittest.cc src/tcmalloc.h \
src/tests/testutil.h src/tests/testutil.cc \
src/config_for_unittests.h src/gperftools/malloc_extension.h
-@WITH_HEAP_PROFILER_OR_CHECKER_TRUE@am__objects_43 = tcmalloc_debug_unittest-tcmalloc_unittest.$(OBJEXT) \
+@WITH_HEAP_PROFILER_OR_CHECKER_TRUE@am__objects_42 = tcmalloc_debug_unittest-tcmalloc_unittest.$(OBJEXT) \
@WITH_HEAP_PROFILER_OR_CHECKER_TRUE@ tcmalloc_debug_unittest-testutil.$(OBJEXT) \
@WITH_HEAP_PROFILER_OR_CHECKER_TRUE@ $(am__objects_1)
-@WITH_DEBUGALLOC_TRUE@@WITH_HEAP_PROFILER_OR_CHECKER_TRUE@am_tcmalloc_debug_unittest_OBJECTS = $(am__objects_43)
+@WITH_DEBUGALLOC_TRUE@@WITH_HEAP_PROFILER_OR_CHECKER_TRUE@am_tcmalloc_debug_unittest_OBJECTS = $(am__objects_42)
tcmalloc_debug_unittest_OBJECTS = \
$(am_tcmalloc_debug_unittest_OBJECTS)
@WITH_DEBUGALLOC_TRUE@@WITH_HEAP_PROFILER_OR_CHECKER_TRUE@tcmalloc_debug_unittest_DEPENDENCIES = libtcmalloc_debug.la \
@@ -1459,12 +1465,12 @@
src/tests/tcmalloc_unittest.cc src/tests/testutil.h \
src/tests/testutil.cc src/config_for_unittests.h \
src/gperftools/malloc_extension.h
-am__objects_44 = \
+am__objects_43 = \
tcmalloc_minimal_debug_unittest-tcmalloc_unittest.$(OBJEXT) \
tcmalloc_minimal_debug_unittest-testutil.$(OBJEXT) \
$(am__objects_1)
@WITH_DEBUGALLOC_TRUE@am_tcmalloc_minimal_debug_unittest_OBJECTS = \
-@WITH_DEBUGALLOC_TRUE@ $(am__objects_44)
+@WITH_DEBUGALLOC_TRUE@ $(am__objects_43)
tcmalloc_minimal_debug_unittest_OBJECTS = \
$(am_tcmalloc_minimal_debug_unittest_OBJECTS)
@WITH_DEBUGALLOC_TRUE@tcmalloc_minimal_debug_unittest_DEPENDENCIES = \
@@ -1932,8 +1938,7 @@
src/google/malloc_hook_c.h \
src/google/profiler.h \
src/google/stacktrace.h \
- src/google/tcmalloc.h \
- src/windows/google/tcmalloc.h
+ src/google/tcmalloc.h
# This is for HTML and other documentation you want to install.
# Add your documentation files (in doc/) in addition to these
@@ -2236,10 +2241,9 @@
SG_TCMALLOC_MINIMAL_INCLUDES = src/gperftools/malloc_hook.h \
src/gperftools/malloc_hook_c.h \
src/gperftools/malloc_extension.h \
- src/gperftools/malloc_extension_c.h \
- src/gperftools/stacktrace.h
+ src/gperftools/malloc_extension_c.h
-TCMALLOC_MINIMAL_INCLUDES = $(S_TCMALLOC_MINIMAL_INCLUDES) $(SG_TCMALLOC_MINIMAL_INCLUDES)
+TCMALLOC_MINIMAL_INCLUDES = $(S_TCMALLOC_MINIMAL_INCLUDES) $(SG_TCMALLOC_MINIMAL_INCLUDES) $(SG_STACKTRACE_INCLUDES)
libtcmalloc_minimal_internal_la_SOURCES = src/common.cc \
src/internal_logging.cc \
$(SYSTEM_ALLOC_CC) \
@@ -2459,11 +2463,12 @@
@WITH_HEAP_PROFILER_OR_CHECKER_TRUE@ src/base/thread_lister.h \
@WITH_HEAP_PROFILER_OR_CHECKER_TRUE@ src/heap-profile-table.h
-@WITH_HEAP_PROFILER_OR_CHECKER_TRUE@SG_TCMALLOC_INCLUDES = $(SG_TCMALLOC_MINIMAL_INCLUDES) \
-@WITH_HEAP_PROFILER_OR_CHECKER_TRUE@ src/gperftools/heap-profiler.h \
+@WITH_HEAP_PROFILER_OR_CHECKER_TRUE@SG_TCMALLOC_INCLUDES = src/gperftools/heap-profiler.h \
@WITH_HEAP_PROFILER_OR_CHECKER_TRUE@ src/gperftools/heap-checker.h
-@WITH_HEAP_PROFILER_OR_CHECKER_TRUE@TCMALLOC_INCLUDES = $(S_TCMALLOC_INCLUDES) $(SG_TCMALLOC_INCLUDES)
+@WITH_HEAP_PROFILER_OR_CHECKER_TRUE@TCMALLOC_INCLUDES = $(S_TCMALLOC_INCLUDES) $(SG_TCMALLOC_MINIMAL_INCLUDES) \
+@WITH_HEAP_PROFILER_OR_CHECKER_TRUE@ $(SG_TCMALLOC_INCLUDES) $(SG_STACKTRACE_INCLUDES)
+
@WITH_HEAP_PROFILER_OR_CHECKER_TRUE@libtcmalloc_internal_la_SOURCES = $(libtcmalloc_minimal_internal_la_SOURCES) \
@WITH_HEAP_PROFILER_OR_CHECKER_TRUE@ $(TCMALLOC_INCLUDES) \
@WITH_HEAP_PROFILER_OR_CHECKER_TRUE@ src/base/low_level_alloc.cc \
@@ -2669,10 +2674,10 @@
@WITH_CPU_PROFILER_TRUE@ $(SPINLOCK_INCLUDES) \
@WITH_CPU_PROFILER_TRUE@ $(LOGGING_INCLUDES)
-@WITH_CPU_PROFILER_TRUE@SG_CPU_PROFILER_INCLUDES = src/gperftools/profiler.h \
-@WITH_CPU_PROFILER_TRUE@ src/gperftools/stacktrace.h
+@WITH_CPU_PROFILER_TRUE@SG_CPU_PROFILER_INCLUDES = src/gperftools/profiler.h
+@WITH_CPU_PROFILER_TRUE@CPU_PROFILER_INCLUDES = $(S_CPU_PROFILER_INCLUDES) $(SG_CPU_PROFILER_INCLUDES) \
+@WITH_CPU_PROFILER_TRUE@ $(SG_STACKTRACE_INCLUDES)
-@WITH_CPU_PROFILER_TRUE@CPU_PROFILER_INCLUDES = $(S_CPU_PROFILER_INCLUDES) $(SG_CPU_PROFILER_INCLUDES)
@WITH_CPU_PROFILER_TRUE@libprofiler_la_SOURCES = src/profiler.cc \
@WITH_CPU_PROFILER_TRUE@ src/profile-handler.cc \
@WITH_CPU_PROFILER_TRUE@ src/profiledata.cc \
@@ -4744,7 +4749,7 @@
-rm -rf .libs _libs
distclean-libtool:
- -rm -f libtool
+ -rm -f libtool config.lt
install-man1: $(man1_MANS) $(man_MANS)
@$(NORMAL_INSTALL)
test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)"
@@ -4756,8 +4761,8 @@
esac; \
done; \
for i in $$list; do \
- if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
- else file=$$i; fi; \
+ if test -f $$i; then file=$$i; \
+ else file=$(srcdir)/$$i; fi; \
ext=`echo $$i | sed -e 's/^.*\\.//'`; \
case "$$ext" in \
1*) ;; \
@@ -4881,7 +4886,7 @@
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
@@ -4924,7 +4929,7 @@
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
check-TESTS: $(TESTS)
- @failed=0; all=0; xfail=0; xpass=0; skip=0; ws='[ ]'; \
+ @failed=0; all=0; xfail=0; xpass=0; skip=0; \
srcdir=$(srcdir); export srcdir; \
list=' $(TESTS) '; \
if test -n "$$list"; then \
@@ -4935,7 +4940,7 @@
if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \
all=`expr $$all + 1`; \
case " $(XFAIL_TESTS) " in \
- *$$ws$$tst$$ws*) \
+ *[\ \ ]$$tst[\ \ ]*) \
xpass=`expr $$xpass + 1`; \
failed=`expr $$failed + 1`; \
echo "XPASS: $$tst"; \
@@ -4947,7 +4952,7 @@
elif test $$? -ne 77; then \
all=`expr $$all + 1`; \
case " $(XFAIL_TESTS) " in \
- *$$ws$$tst$$ws*) \
+ *[\ \ ]$$tst[\ \ ]*) \
xfail=`expr $$xfail + 1`; \
echo "XFAIL: $$tst"; \
;; \
@@ -4961,23 +4966,36 @@
echo "SKIP: $$tst"; \
fi; \
done; \
+ if test "$$all" -eq 1; then \
+ tests="test"; \
+ All=""; \
+ else \
+ tests="tests"; \
+ All="All "; \
+ fi; \
if test "$$failed" -eq 0; then \
if test "$$xfail" -eq 0; then \
- banner="All $$all tests passed"; \
+ banner="$$All$$all $$tests passed"; \
else \
- banner="All $$all tests behaved as expected ($$xfail expected failures)"; \
+ if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \
+ banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \
fi; \
else \
if test "$$xpass" -eq 0; then \
- banner="$$failed of $$all tests failed"; \
+ banner="$$failed of $$all $$tests failed"; \
else \
- banner="$$failed of $$all tests did not behave as expected ($$xpass unexpected passes)"; \
+ if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \
+ banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \
fi; \
fi; \
dashes="$$banner"; \
skipped=""; \
if test "$$skip" -ne 0; then \
- skipped="($$skip tests were not run)"; \
+ if test "$$skip" -eq 1; then \
+ skipped="($$skip test was not run)"; \
+ else \
+ skipped="($$skip tests were not run)"; \
+ fi; \
test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \
dashes="$$skipped"; \
fi; \
@@ -4997,6 +5015,19 @@
else :; fi
distdir: $(DISTFILES)
+ @list='$(MANS)'; if test -n "$$list"; then \
+ list=`for p in $$list; do \
+ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+ if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \
+ if test -n "$$list" && \
+ grep 'ab help2man is required to generate this page' $$list >/dev/null; then \
+ echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \
+ grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \
+ echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \
+ echo " typically \`make maintainer-clean' will remove them" >&2; \
+ exit 1; \
+ else :; fi; \
+ else :; fi
$(am__remove_distdir)
test -d $(distdir) || mkdir $(distdir)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
@@ -5027,7 +5058,8 @@
$(MAKE) $(AM_MAKEFLAGS) \
top_distdir="$(top_distdir)" distdir="$(distdir)" \
dist-hook
- -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
+ -find "$(distdir)" -type d ! -perm -755 \
+ -exec chmod u+rwx,go+rx {} \; -o \
! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
! -type d ! -perm -400 -exec chmod a+r {} \; -o \
! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
@@ -5187,6 +5219,8 @@
html: html-am
+html-am:
+
info: info-am
info-am:
@@ -5197,19 +5231,29 @@
install-dvi: install-dvi-am
+install-dvi-am:
+
install-exec-am: install-binPROGRAMS install-binSCRIPTS \
install-exec-local install-libLTLIBRARIES
install-html: install-html-am
+install-html-am:
+
install-info: install-info-am
+install-info-am:
+
install-man: install-man1
install-pdf: install-pdf-am
+install-pdf-am:
+
install-ps: install-ps-am
+install-ps-am:
+
installcheck-am:
maintainer-clean: maintainer-clean-am
diff -urP gperftools-2.0/NEWS /home/spot/gperftools/NEWS
--- gperftools-2.0/NEWS 2012-02-03 18:40:46.000000000 -0500
+++ /home/spot/gperftools/NEWS 2013-03-01 14:25:39.165366808 -0500
@@ -12,7 +12,7 @@
I have both renamed the project (the Google Code site renamed a few
weeks ago), and bumped the major version number up to 2, to reflect
the new community ownership of the project. Almost all the
-[http://sparsehash.googlecode.com/svn/tags/gperftools-2.0/ChangeLog changes]
+[http://gperftools.googlecode.com/svn/tags/gperftools-2.0/ChangeLog changes]
are related to the renaming.
The main functional change from google-perftools 1.10 is that
diff -urP gperftools-2.0/src/base/atomicops-internals-linuxppc.h /home/spot/gperftools/src/base/atomicops-internals-linuxppc.h
--- gperftools-2.0/src/base/atomicops-internals-linuxppc.h 2012-02-02 16:36:23.000000000 -0500
+++ /home/spot/gperftools/src/base/atomicops-internals-linuxppc.h 2013-03-01 14:25:38.722366824 -0500
@@ -237,7 +237,7 @@
Atomic64 prev;
__asm__ __volatile__(
"1: ldarx %0,0,%2\n\
- cmpw 0,%0,%3\n\
+ cmpd 0,%0,%3\n\
bne- 2f\n\
stdcx. %4,0,%2\n\
bne- 1b\n\
diff -urP gperftools-2.0/src/base/atomicops-internals-windows.h /home/spot/gperftools/src/base/atomicops-internals-windows.h
--- gperftools-2.0/src/base/atomicops-internals-windows.h 2012-02-02 16:36:23.000000000 -0500
+++ /home/spot/gperftools/src/base/atomicops-internals-windows.h 2013-03-01 14:25:38.731366824 -0500
@@ -434,16 +434,14 @@
#endif
}
-inline void NoBarrier_Store(volatile Atomic64* ptr, Atomic64 value) {
-#if 0 // Not implemented
- __asm {
- mov mm0, value; // Use mmx reg for 64-bit atomic moves
- mov ptr, mm0;
- emms; // Empty mmx state to enable FP registers
- }
-#else
- NotImplementedFatalError("NoBarrier_Store");
-#endif
+inline void NoBarrier_Store(volatile Atomic64* ptrValue, Atomic64 value)
+{
+ __asm {
+ movq mm0, value; // Use mmx reg for 64-bit atomic moves
+ mov eax, ptrValue;
+ movq [eax], mm0;
+ emms; // Empty mmx state to enable FP registers
+ }
}
inline void Acquire_Store(volatile Atomic64* ptr, Atomic64 value) {
@@ -455,19 +453,16 @@
NoBarrier_Store(ptr, value);
}
-inline Atomic64 NoBarrier_Load(volatile const Atomic64* ptr) {
-#if 0 // Not implemented
- Atomic64 value;
- __asm {
- mov mm0, ptr; // Use mmx reg for 64-bit atomic moves
- mov value, mm0;
- emms; // Empty mmx state to enable FP registers
+inline Atomic64 NoBarrier_Load(volatile const Atomic64* ptrValue)
+{
+ Atomic64 value;
+ __asm {
+ mov eax, ptrValue;
+ movq mm0, [eax]; // Use mmx reg for 64-bit atomic moves
+ movq value, mm0;
+ emms; // Empty mmx state to enable FP registers
}
return value;
-#else
- NotImplementedFatalError("NoBarrier_Store");
- return 0;
-#endif
}
inline Atomic64 Acquire_Load(volatile const Atomic64* ptr) {
diff -urP gperftools-2.0/src/base/basictypes.h /home/spot/gperftools/src/base/basictypes.h
--- gperftools-2.0/src/base/basictypes.h 2012-02-02 16:36:23.000000000 -0500
+++ /home/spot/gperftools/src/base/basictypes.h 2013-03-01 14:25:38.724366824 -0500
@@ -1,10 +1,10 @@
// Copyright (c) 2005, Google Inc.
// All rights reserved.
-//
+//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
-//
+//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
@@ -14,7 +14,7 @@
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
-//
+//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
@@ -331,8 +331,14 @@
#endif // HAVE___ATTRIBUTE__ and __ELF__ or __MACH__
-#if defined(HAVE___ATTRIBUTE__) && (defined(__i386__) || defined(__x86_64__))
-# define CACHELINE_ALIGNED __attribute__((aligned(64)))
+#if defined(HAVE___ATTRIBUTE__)
+# if (defined(__i386__) || defined(__x86_64__))
+# define CACHELINE_ALIGNED __attribute__((aligned(64)))
+# elif defined(__arm__)
+# define CACHELINE_ALIGNED __attribute__((aligned(32)))
+# elif (defined(__PPC__) || defined(__PPC64__))
+# define CACHELINE_ALIGNED __attribute__((aligned(16)))
+# endif
#else
# define CACHELINE_ALIGNED
#endif // defined(HAVE___ATTRIBUTE__) && (__i386__ || __x86_64__)
diff -urP gperftools-2.0/src/base/cycleclock.h /home/spot/gperftools/src/base/cycleclock.h
--- gperftools-2.0/src/base/cycleclock.h 2012-02-02 16:36:23.000000000 -0500
+++ /home/spot/gperftools/src/base/cycleclock.h 2013-03-01 14:25:38.729366824 -0500
@@ -97,15 +97,24 @@
uint64 low, high;
__asm__ volatile ("rdtsc" : "=a" (low), "=d" (high));
return (high << 32) | low;
+#elif defined(__powerpc64__) || defined(__ppc64__)
+ uint64 tb;
+ __asm__ volatile (\
+ "mfspr %0, 268"
+ : "=r" (tb));
+ return tb;
#elif defined(__powerpc__) || defined(__ppc__)
// This returns a time-base, which is not always precisely a cycle-count.
- int64 tbl, tbu0, tbu1;
- asm("mftbu %0" : "=r" (tbu0));
- asm("mftb %0" : "=r" (tbl));
- asm("mftbu %0" : "=r" (tbu1));
- tbl &= -static_cast<int64>(tbu0 == tbu1);
- // high 32 bits in tbu1; low 32 bits in tbl (tbu0 is garbage)
- return (tbu1 << 32) | tbl;
+ uint32 tbu, tbl, tmp;
+ __asm__ volatile (\
+ "0:\n"
+ "mftbu %0\n"
+ "mftbl %1\n"
+ "mftbu %2\n"
+ "cmpw %0, %2\n"
+ "bne- 0b"
+ : "=r" (tbu), "=r" (tbl), "=r" (tmp));
+ return (((uint64) tbu << 32) | tbl);
#elif defined(__sparc__)
int64 tick;
asm(".byte 0x83, 0x41, 0x00, 0x00");
diff -urP gperftools-2.0/src/base/linux_syscall_support.h /home/spot/gperftools/src/base/linux_syscall_support.h
--- gperftools-2.0/src/base/linux_syscall_support.h 2012-02-02 16:36:23.000000000 -0500
+++ /home/spot/gperftools/src/base/linux_syscall_support.h 2013-03-01 14:25:38.732366824 -0500
@@ -243,14 +243,13 @@
long ru_nivcsw;
};
-struct siginfo;
#if defined(__i386__) || defined(__arm__) || defined(__PPC__)
/* include/asm-{arm,i386,mips,ppc}/signal.h */
struct kernel_old_sigaction {
union {
void (*sa_handler_)(int);
- void (*sa_sigaction_)(int, struct siginfo *, void *);
+ void (*sa_sigaction_)(int, siginfo_t *, void *);
};
unsigned long sa_mask;
unsigned long sa_flags;
@@ -287,13 +286,13 @@
unsigned long sa_flags;
union {
void (*sa_handler_)(int);
- void (*sa_sigaction_)(int, struct siginfo *, void *);
+ void (*sa_sigaction_)(int, siginfo_t *, void *);
};
struct kernel_sigset_t sa_mask;
#else
union {
void (*sa_handler_)(int);
- void (*sa_sigaction_)(int, struct siginfo *, void *);
+ void (*sa_sigaction_)(int, siginfo_t *, void *);
};
unsigned long sa_flags;
void (*sa_restorer)(void);
diff -urP gperftools-2.0/src/base/linuxthreads.cc /home/spot/gperftools/src/base/linuxthreads.cc
--- gperftools-2.0/src/base/linuxthreads.cc 2012-02-02 16:36:23.000000000 -0500
+++ /home/spot/gperftools/src/base/linuxthreads.cc 2013-03-01 14:25:38.729366824 -0500
@@ -45,6 +45,8 @@
#include <fcntl.h>
#include <sys/socket.h>
#include <sys/wait.h>
+#include <sys/prctl.h>
+#include <semaphore.h>
#include "base/linux_syscall_support.h"
#include "base/thread_lister.h"
@@ -240,6 +242,7 @@
ListAllProcessThreadsCallBack callback;
void *parameter;
va_list ap;
+ sem_t *lock;
};
@@ -254,6 +257,13 @@
struct kernel_stat marker_sb, proc_sb;
stack_t altstack;
+ /* Wait for parent thread to set appropriate permissions
+ * to allow ptrace activity
+ */
+ if (sem_wait(args->lock) < 0) {
+ goto failure;
+ }
+
/* Create "marker" that we can use to detect threads sharing the same
* address space and the same file handles. By setting the FD_CLOEXEC flag
* we minimize the risk of misidentifying child processes as threads;
@@ -398,7 +408,7 @@
/* Check if the marker is identical to the one we created */
if (sys_stat(fname, &tmp_sb) >= 0 &&
marker_sb.st_ino == tmp_sb.st_ino) {
- long i, j;
+ long i;
/* Found one of our threads, make sure it is no duplicate */
for (i = 0; i < num_threads; i++) {
@@ -434,28 +444,28 @@
sig_num_threads = num_threads;
goto next_entry;
}
- while (sys_waitpid(pid, (int *)0, __WALL) < 0) {
+ /* Attaching to a process doesn't guarantee it'll stop before
+ * ptrace returns; you have to wait on it. Specifying __WCLONE
+ * means it will only wait for clone children (i.e. threads,
+ * not processes).
+ */
+ while (sys_waitpid(pid, (int *)0, __WCLONE) < 0) {
if (errno != EINTR) {
- sys_ptrace_detach(pid);
- num_threads--;
- sig_num_threads = num_threads;
- goto next_entry;
+ /* Assumes ECHILD */
+ if (pid == ppid) {
+ /* The parent is not a clone */
+ found_parent = true;
+ break;
+ } else {
+ sys_ptrace_detach(pid);
+ num_threads--;
+ sig_num_threads = num_threads;
+ goto next_entry;
+ }
}
}
-
- if (sys_ptrace(PTRACE_PEEKDATA, pid, &i, &j) || i++ != j ||
- sys_ptrace(PTRACE_PEEKDATA, pid, &i, &j) || i != j) {
- /* Address spaces are distinct, even though both
- * processes show the "marker". This is probably
- * a forked child process rather than a thread.
- */
- sys_ptrace_detach(pid);
- num_threads--;
- sig_num_threads = num_threads;
- } else {
- found_parent |= pid == ppid;
- added_entries++;
- }
+
+ added_entries++;
}
}
}
@@ -536,6 +546,7 @@
pid_t clone_pid;
int dumpable = 1, sig;
struct kernel_sigset_t sig_blocked, sig_old;
+ sem_t lock;
va_start(args.ap, callback);
@@ -565,6 +576,7 @@
args.altstack_mem = altstack_mem;
args.parameter = parameter;
args.callback = callback;
+ args.lock = &lock;
/* Before cloning the thread lister, block all asynchronous signals, as we */
/* are not prepared to handle them. */
@@ -596,42 +608,63 @@
#undef SYS_LINUX_SYSCALL_SUPPORT_H
#include "linux_syscall_support.h"
#endif
-
- int clone_errno;
- clone_pid = local_clone((int (*)(void *))ListerThread, &args);
- clone_errno = errno;
-
- sys_sigprocmask(SIG_SETMASK, &sig_old, &sig_old);
-
- if (clone_pid >= 0) {
- int status, rc;
- while ((rc = sys0_waitpid(clone_pid, &status, __WALL)) < 0 &&
- ERRNO == EINTR) {
- /* Keep waiting */
- }
- if (rc < 0) {
- args.err = ERRNO;
- args.result = -1;
- } else if (WIFEXITED(status)) {
- switch (WEXITSTATUS(status)) {
- case 0: break; /* Normal process termination */
- case 2: args.err = EFAULT; /* Some fault (e.g. SIGSEGV) detected */
- args.result = -1;
- break;
- case 3: args.err = EPERM; /* Process is already being traced */
- args.result = -1;
- break;
- default:args.err = ECHILD; /* Child died unexpectedly */
- args.result = -1;
- break;
+
+ /* Lock before clone so that parent can set
+ * ptrace permissions (if necessary) prior
+ * to ListerThread actually executing
+ */
+ if (sem_init(&lock, 0, 0) == 0) {
+
+ int clone_errno;
+ clone_pid = local_clone((int (*)(void *))ListerThread, &args);
+ clone_errno = errno;
+
+ sys_sigprocmask(SIG_SETMASK, &sig_old, &sig_old);
+
+ if (clone_pid >= 0) {
+#ifdef PR_SET_PTRACER
+ /* In newer versions of glibc permission must explicitly
+ * be given to allow for ptrace.
+ */
+ prctl(PR_SET_PTRACER, clone_pid, 0, 0, 0);
+#endif
+ /* Releasing the lock here allows the
+ * ListerThread to execute and ptrace us.
+ */
+ sem_post(&lock);
+ int status, rc;
+ while ((rc = sys0_waitpid(clone_pid, &status, __WALL)) < 0 &&
+ ERRNO == EINTR) {
+ /* Keep waiting */
+ }
+ if (rc < 0) {
+ args.err = ERRNO;
+ args.result = -1;
+ } else if (WIFEXITED(status)) {
+ switch (WEXITSTATUS(status)) {
+ case 0: break; /* Normal process termination */
+ case 2: args.err = EFAULT; /* Some fault (e.g. SIGSEGV) detected */
+ args.result = -1;
+ break;
+ case 3: args.err = EPERM; /* Process is already being traced */
+ args.result = -1;
+ break;
+ default:args.err = ECHILD; /* Child died unexpectedly */
+ args.result = -1;
+ break;
+ }
+ } else if (!WIFEXITED(status)) {
+ args.err = EFAULT; /* Terminated due to an unhandled signal*/
+ args.result = -1;
}
- } else if (!WIFEXITED(status)) {
- args.err = EFAULT; /* Terminated due to an unhandled signal*/
+ sem_destroy(&lock);
+ } else {
args.result = -1;
+ args.err = clone_errno;
}
} else {
args.result = -1;
- args.err = clone_errno;
+ args.err = errno;
}
}
diff -urP gperftools-2.0/src/base/spinlock_internal.cc /home/spot/gperftools/src/base/spinlock_internal.cc
--- gperftools-2.0/src/base/spinlock_internal.cc 2012-02-02 16:36:23.000000000 -0500
+++ /home/spot/gperftools/src/base/spinlock_internal.cc 2013-03-01 14:25:38.724366824 -0500
@@ -80,6 +80,7 @@
static int SuggestedDelayNS(int loop) {
// Weak pseudo-random number generator to get some spread between threads
// when many are spinning.
+#ifdef BASE_HAS_ATOMIC64
static base::subtle::Atomic64 rand;
uint64 r = base::subtle::NoBarrier_Load(&rand);
r = 0x5deece66dLL * r + 0xb; // numbers from nrand48()
@@ -96,6 +97,24 @@
// The futex path multiplies this by 16, since we expect explicit wakeups
// almost always on that path.
return r >> (44 - (loop >> 3));
+#else
+ static Atomic32 rand;
+ uint32 r = base::subtle::NoBarrier_Load(&rand);
+ r = 0x343fd * r + 0x269ec3; // numbers from MSVC++
+ base::subtle::NoBarrier_Store(&rand, r);
+
+ r <<= 1; // 31-bit random number now in top 31-bits.
+ if (loop < 0 || loop > 32) { // limit loop to 0..32
+ loop = 32;
+ }
+ // loop>>3 cannot exceed 4 because loop cannot exceed 32.
+ // Select top 20..24 bits of lower 31 bits,
+ // giving approximately 0ms to 16ms.
+ // Mean is exponential in loop for first 32 iterations, then 8ms.
+ // The futex path multiplies this by 16, since we expect explicit wakeups
+ // almost always on that path.
+ return r >> (12 - (loop >> 3));
+#endif
}
} // namespace internal
diff -urP gperftools-2.0/src/base/sysinfo.cc /home/spot/gperftools/src/base/sysinfo.cc
--- gperftools-2.0/src/base/sysinfo.cc 2012-02-02 16:36:23.000000000 -0500
+++ /home/spot/gperftools/src/base/sysinfo.cc 2013-03-01 14:25:38.732366824 -0500
@@ -32,6 +32,7 @@
# define PLATFORM_WINDOWS 1
#endif
+#include <ctype.h> // for isspace()
#include <stdlib.h> // for getenv()
#include <stdio.h> // for snprintf(), sscanf()
#include <string.h> // for memmove(), memchr(), etc.
@@ -350,6 +351,22 @@
if (newline != NULL)
*newline = '\0';
+#if defined(__powerpc__) || defined(__ppc__)
+ // PowerPC cpus report the frequency in "clock" line
+ if (strncasecmp(line, "clock", sizeof("clock")-1) == 0) {
+ const char* freqstr = strchr(line, ':');
+ if (freqstr) {
+ // PowerPC frequencies are only reported as MHz (check 'show_cpuinfo'
+ // function at arch/powerpc/kernel/setup-common.c)
+ char *endp = strstr(line, "MHz");
+ if (endp) {
+ *endp = 0;
+ cpuinfo_cycles_per_second = strtod(freqstr+1, &err) * 1000000.0;
+ if (freqstr[1] != '\0' && *err == '\0' && cpuinfo_cycles_per_second > 0)
+ saw_mhz = true;
+ }
+ }
+#else
// When parsing the "cpu MHz" and "bogomips" (fallback) entries, we only
// accept postive values. Some environments (virtual machines) report zero,
// which would cause infinite looping in WallTime_Init.
@@ -367,6 +384,7 @@
if (freqstr[1] != '\0' && *err == '\0' && bogo_clock > 0)
saw_bogo = true;
}
+#endif
} else if (strncasecmp(line, "processor", sizeof("processor")-1) == 0) {
num_cpus++; // count up every time we see an "processor :" entry
}
@@ -558,6 +576,145 @@
}
#endif
+// Finds |c| in |text|, and assign '\0' at the found position.
+// The original character at the modified position should be |c|.
+// A pointer to the modified position is stored in |endptr|.
+// |endptr| should not be NULL.
+static bool ExtractUntilChar(char *text, int c, char **endptr) {
+ CHECK_NE(text, NULL);
+ CHECK_NE(endptr, NULL);
+ char *found;
+ found = strchr(text, c);
+ if (found == NULL) {
+ *endptr = NULL;
+ return false;
+ }
+
+ *endptr = found;
+ *found = '\0';
+ return true;
+}
+
+// Increments |*text_pointer| while it points a whitespace character.
+// It is to follow sscanf's whilespace handling.
+static void SkipWhileWhitespace(char **text_pointer, int c) {
+ if (isspace(c)) {
+ while (isspace(**text_pointer) && isspace(*((*text_pointer) + 1))) {
+ ++(*text_pointer);
+ }
+ }
+}
+
+template<class T>
+static T StringToInteger(char *text, char **endptr, int base) {
+ assert(false);
+ return T();
+}
+
+template<>
+int StringToInteger<int>(char *text, char **endptr, int base) {
+ return strtol(text, endptr, base);
+}
+
+template<>
+int64 StringToInteger<int64>(char *text, char **endptr, int base) {
+ return strtoll(text, endptr, base);
+}
+
+template<>
+uint64 StringToInteger<uint64>(char *text, char **endptr, int base) {
+ return strtoull(text, endptr, base);
+}
+
+template<typename T>
+static T StringToIntegerUntilChar(
+ char *text, int base, int c, char **endptr_result) {
+ CHECK_NE(endptr_result, NULL);
+ *endptr_result = NULL;
+
+ char *endptr_extract;
+ if (!ExtractUntilChar(text, c, &endptr_extract))
+ return 0;
+
+ T result;
+ char *endptr_strto;
+ result = StringToInteger<T>(text, &endptr_strto, base);
+ *endptr_extract = c;
+
+ if (endptr_extract != endptr_strto)
+ return 0;
+
+ *endptr_result = endptr_extract;
+ SkipWhileWhitespace(endptr_result, c);
+
+ return result;
+}
+
+static char *CopyStringUntilChar(
+ char *text, unsigned out_len, int c, char *out) {
+ char *endptr;
+ if (!ExtractUntilChar(text, c, &endptr))
+ return NULL;
+
+ strncpy(out, text, out_len);
+ out[out_len-1] = '\0';
+ *endptr = c;
+
+ SkipWhileWhitespace(&endptr, c);
+ return endptr;
+}
+
+template<typename T>
+static bool StringToIntegerUntilCharWithCheck(
+ T *outptr, char *text, int base, int c, char **endptr) {
+ *outptr = StringToIntegerUntilChar<T>(*endptr, base, c, endptr);
+ if (*endptr == NULL || **endptr == '\0') return false;
+ ++(*endptr);
+ return true;
+}
+
+static bool ParseProcMapsLine(char *text, uint64 *start, uint64 *end,
+ char *flags, uint64 *offset,
+ int *major, int *minor, int64 *inode,
+ unsigned *filename_offset) {
+#if defined(__linux__)
+ /*
+ * It's similar to:
+ * sscanf(text, "%"SCNx64"-%"SCNx64" %4s %"SCNx64" %x:%x %"SCNd64" %n",
+ * start, end, flags, offset, major, minor, inode, filename_offset)
+ */
+ char *endptr = text;
+ if (endptr == NULL || *endptr == '\0') return false;
+
+ if (!StringToIntegerUntilCharWithCheck(start, endptr, 16, '-', &endptr))
+ return false;
+
+ if (!StringToIntegerUntilCharWithCheck(end, endptr, 16, ' ', &endptr))
+ return false;
+
+ endptr = CopyStringUntilChar(endptr, 5, ' ', flags);
+ if (endptr == NULL || *endptr == '\0') return false;
+ ++endptr;
+
+ if (!StringToIntegerUntilCharWithCheck(offset, endptr, 16, ' ', &endptr))
+ return false;
+
+ if (!StringToIntegerUntilCharWithCheck(major, endptr, 16, ':', &endptr))
+ return false;
+
+ if (!StringToIntegerUntilCharWithCheck(minor, endptr, 16, ' ', &endptr))
+ return false;
+
+ if (!StringToIntegerUntilCharWithCheck(inode, endptr, 10, ' ', &endptr))
+ return false;
+
+ *filename_offset = (endptr - text);
+ return true;
+#else
+ return false;
+#endif
+}
+
ProcMapsIterator::ProcMapsIterator(pid_t pid) {
Init(pid, NULL, false);
}
@@ -712,13 +869,14 @@
unsigned filename_offset = 0;
#if defined(__linux__)
// for now, assume all linuxes have the same format
- if (sscanf(stext_, "%"SCNx64"-%"SCNx64" %4s %"SCNx64" %x:%x %"SCNd64" %n",
- start ? start : &tmpstart,
- end ? end : &tmpend,
- flags_,
- offset ? offset : &tmpoffset,
- &major, &minor,
- inode ? inode : &tmpinode, &filename_offset) != 7) continue;
+ if (!ParseProcMapsLine(
+ stext_,
+ start ? start : &tmpstart,
+ end ? end : &tmpend,
+ flags_,
+ offset ? offset : &tmpoffset,
+ &major, &minor,
+ inode ? inode : &tmpinode, &filename_offset)) continue;
#elif defined(__CYGWIN__) || defined(__CYGWIN32__)
// cygwin is like linux, except the third field is the "entry point"
// rather than the offset (see format_process_maps at
@@ -749,7 +907,7 @@
// start end resident privateresident obj(?) prot refcnt shadowcnt
// flags copy_on_write needs_copy type filename:
// 0x8048000 0x804a000 2 0 0xc104ce70 r-x 1 0 0x0 COW NC vnode /bin/cat
- if (sscanf(stext_, "0x%"SCNx64" 0x%"SCNx64" %*d %*d %*p %3s %*d %*d 0x%*x %*s %*s %*s %n",
+ if (sscanf(stext_, "0x%" SCNx64 " 0x%" SCNx64 " %*d %*d %*p %3s %*d %*d 0x%*x %*s %*s %*s %n",
start ? start : &tmpstart,
end ? end : &tmpend,
flags_,
@@ -786,7 +944,7 @@
uint64 tmp_anon_mapping;
uint64 tmp_anon_pages;
- sscanf(backing_ptr+1, "F %"SCNx64" %"SCNd64") (A %"SCNx64" %"SCNd64")",
+ sscanf(backing_ptr+1, "F %" SCNx64 " %" SCNd64 ") (A %" SCNx64 " %" SCNd64 ")",
file_mapping ? file_mapping : &tmp_file_mapping,
file_pages ? file_pages : &tmp_file_pages,
anon_mapping ? anon_mapping : &tmp_anon_mapping,
@@ -926,7 +1084,7 @@
? '-' : 'p';
const int rc = snprintf(buffer, bufsize,
- "%08"PRIx64"-%08"PRIx64" %c%c%c%c %08"PRIx64" %02x:%02x %-11"PRId64" %s\n",
+ "%08" PRIx64 "-%08" PRIx64 " %c%c%c%c %08" PRIx64 " %02x:%02x %-11" PRId64 " %s\n",
start, end, r,w,x,p, offset,
static_cast<int>(dev/256), static_cast<int>(dev%256),
inode, filename);
diff -urP gperftools-2.0/src/common.cc /home/spot/gperftools/src/common.cc
--- gperftools-2.0/src/common.cc 2012-02-02 16:36:23.000000000 -0500
+++ /home/spot/gperftools/src/common.cc 2013-03-01 14:25:38.074366847 -0500
@@ -60,16 +60,16 @@
} else if (size >= 128) {
// Space wasted due to alignment is at most 1/8, i.e., 12.5%.
alignment = (1 << LgFloor(size)) / 8;
- } else if (size >= 16) {
+ } else if (size >= kMinAlign) {
// We need an alignment of at least 16 bytes to satisfy
// requirements for some SSE types.
- alignment = 16;
+ alignment = kMinAlign;
}
// Maximum alignment allowed is page size alignment.
if (alignment > kPageSize) {
alignment = kPageSize;
}
- CHECK_CONDITION(size < 16 || alignment >= 16);
+ CHECK_CONDITION(size < kMinAlign || alignment >= kMinAlign);
CHECK_CONDITION((alignment & (alignment - 1)) == 0);
return alignment;
}
@@ -110,7 +110,7 @@
// Compute the size classes we want to use
int sc = 1; // Next size class to assign
int alignment = kAlignment;
- CHECK_CONDITION(kAlignment <= 16);
+ CHECK_CONDITION(kAlignment <= kMinAlign);
for (size_t size = kAlignment; size <= kMaxSize; size += alignment) {
alignment = AlignmentForSize(size);
CHECK_CONDITION((size % alignment) == 0);
diff -urP gperftools-2.0/src/common.h /home/spot/gperftools/src/common.h
--- gperftools-2.0/src/common.h 2012-02-02 16:36:23.000000000 -0500
+++ /home/spot/gperftools/src/common.h 2013-03-01 14:25:38.737366824 -0500
@@ -1,10 +1,10 @@
// Copyright (c) 2008, Google Inc.
// All rights reserved.
-//
+//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
-//
+//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
@@ -14,7 +14,7 @@
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
-//
+//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
@@ -41,6 +41,15 @@
#include <stdint.h> // for uintptr_t, uint64_t
#endif
#include "internal_logging.h" // for ASSERT, etc
+#include "base/basictypes.h" // for LIKELY, etc
+
+#ifdef HAVE_BUILTIN_EXPECT
+#define LIKELY(x) __builtin_expect(!!(x), 1)
+#define UNLIKELY(x) __builtin_expect(!!(x), 0)
+#else
+#define LIKELY(x) (x)
+#define UNLIKELY(x) (x)
+#endif
// Type that can hold a page number
typedef uintptr_t PageID;
@@ -64,9 +73,23 @@
#if defined(TCMALLOC_LARGE_PAGES)
static const size_t kPageShift = 15;
static const size_t kNumClasses = 78;
+static const size_t kMinAlign = 16;
+#elif defined(TCMALLOC_LARGE_PAGES64K)
+static const size_t kPageShift = 16;
+static const size_t kNumClasses = 82;
+static const size_t kMinAlign = 16;
+#elif defined(TCMALLOC_ALIGN_8BYTES)
+static const size_t kPageShift = 13;
+static const size_t kNumClasses = 93;
+// Unless we force to use 8 bytes alignment we use an alignment of
+// at least 16 bytes to statisfy requirements for some SSE types.
+// Keep in mind when using the 16 bytes alignment you can have a space
+// waste due alignment of 25%. (eg malloc of 24 bytes will get 32 bytes)
+static const size_t kMinAlign = 8;
#else
static const size_t kPageShift = 13;
static const size_t kNumClasses = 86;
+static const size_t kMinAlign = 16;
#endif
static const size_t kMaxThreadCacheSize = 4 << 20;
@@ -169,13 +192,15 @@
unsigned char class_array_[kClassArraySize];
// Compute index of the class_array[] entry for a given size
- static inline int ClassIndex(int s) {
+ static inline size_t ClassIndex(int s) {
+ // Use unsigned arithmetic to avoid unnecessary sign extensions.
ASSERT(0 <= s);
ASSERT(s <= kMaxSize);
- const bool big = (s > kMaxSmallSize);
- const int add_amount = big ? (127 + (120<<7)) : 7;
- const int shift_amount = big ? 7 : 3;
- return (s + add_amount) >> shift_amount;
+ if (LIKELY(s <= kMaxSmallSize)) {
+ return (static_cast<uint32_t>(s) + 7) >> 3;
+ } else {
+ return (static_cast<uint32_t>(s) + 127 + (120 << 7)) >> 7;
+ }
}
int NumMoveSize(size_t size);
diff -urP gperftools-2.0/src/config.h.in /home/spot/gperftools/src/config.h.in
--- gperftools-2.0/src/config.h.in 2012-02-03 14:47:15.000000000 -0500
+++ /home/spot/gperftools/src/config.h.in 2013-03-01 14:25:38.205366843 -0500
@@ -5,6 +5,9 @@
#define GPERFTOOLS_CONFIG_H_
+/* Define to 1 if compiler supports __builtin_expect */
+#undef HAVE_BUILTIN_EXPECT
+
/* Define to 1 if compiler supports __builtin_stack_pointer */
#undef HAVE_BUILTIN_STACK_POINTER
diff -urP gperftools-2.0/src/debugallocation.cc /home/spot/gperftools/src/debugallocation.cc
--- gperftools-2.0/src/debugallocation.cc 2012-02-03 14:18:22.000000000 -0500
+++ /home/spot/gperftools/src/debugallocation.cc 2013-03-01 14:25:37.966366851 -0500
@@ -488,7 +488,7 @@
// the address space could take more.
static size_t max_size_t = ~0;
if (size > max_size_t - sizeof(MallocBlock)) {
- RAW_LOG(ERROR, "Massive size passed to malloc: %"PRIuS"", size);
+ RAW_LOG(ERROR, "Massive size passed to malloc: %" PRIuS "", size);
return NULL;
}
MallocBlock* b = NULL;
@@ -958,7 +958,7 @@
do { \
if (FLAGS_malloctrace) { \
SpinLockHolder l(&malloc_trace_lock); \
- TracePrintf(TraceFd(), "%s\t%"PRIuS"\t%p\t%"GPRIuPTHREAD, \
+ TracePrintf(TraceFd(), "%s\t%" PRIuS "\t%p\t%" GPRIuPTHREAD, \
name, size, addr, PRINTABLE_PTHREAD(pthread_self())); \
TraceStack(); \
TracePrintf(TraceFd(), "\n"); \
@@ -1215,7 +1215,7 @@
void* ptr = debug_cpp_alloc(size, MallocBlock::kNewType, false);
MallocHook::InvokeNewHook(ptr, size);
if (ptr == NULL) {
- RAW_LOG(FATAL, "Unable to allocate %"PRIuS" bytes: new failed.", size);
+ RAW_LOG(FATAL, "Unable to allocate %" PRIuS " bytes: new failed.", size);
}
return ptr;
}
@@ -1242,7 +1242,7 @@
void* ptr = debug_cpp_alloc(size, MallocBlock::kArrayNewType, false);
MallocHook::InvokeNewHook(ptr, size);
if (ptr == NULL) {
- RAW_LOG(FATAL, "Unable to allocate %"PRIuS" bytes: new[] failed.", size);
+ RAW_LOG(FATAL, "Unable to allocate %" PRIuS " bytes: new[] failed.", size);
}
return ptr;
}
diff -urP gperftools-2.0/src/getpc.h /home/spot/gperftools/src/getpc.h
--- gperftools-2.0/src/getpc.h 2012-02-02 16:36:23.000000000 -0500
+++ /home/spot/gperftools/src/getpc.h 2013-03-01 14:25:37.973366851 -0500
@@ -94,7 +94,7 @@
int pc_offset;
// The actual instruction bytes. Feel free to make it larger if you
// need a longer sequence.
- char ins[16];
+ unsigned char ins[16];
// How many bytes to match from ins array?
int ins_size;
// The offset from the stack pointer (e)sp where to look for the
diff -urP gperftools-2.0/src/gperftools/malloc_extension.h /home/spot/gperftools/src/gperftools/malloc_extension.h
--- gperftools-2.0/src/gperftools/malloc_extension.h 2012-02-03 14:18:23.000000000 -0500
+++ /home/spot/gperftools/src/gperftools/malloc_extension.h 2013-03-01 14:25:38.126366846 -0500
@@ -169,6 +169,26 @@
// Number of bytes used across all thread caches.
// This property is not writable.
//
+ // "tcmalloc.central_cache_free_bytes"
+ // Number of free bytes in the central cache that have been
+ // assigned to size classes. They always count towards virtual
+ // memory usage, and unless the underlying memory is swapped out
+ // by the OS, they also count towards physical memory usage.
+ // This property is not writable.
+ //
+ // "tcmalloc.transfer_cache_free_bytes"
+ // Number of free bytes that are waiting to be transfered between
+ // the central cache and a thread cache. They always count
+ // towards virtual memory usage, and unless the underlying memory
+ // is swapped out by the OS, they also count towards physical
+ // memory usage. This property is not writable.
+ //
+ // "tcmalloc.thread_cache_free_bytes"
+ // Number of free bytes in thread caches. They always count
+ // towards virtual memory usage, and unless the underlying memory
+ // is swapped out by the OS, they also count towards physical
+ // memory usage. This property is not writable.
+ //
// "tcmalloc.pageheap_free_bytes"
// Number of bytes in free, mapped pages in page heap. These
// bytes can be used to fulfill allocation requests. They
@@ -380,7 +400,7 @@
INUSE, // Application is using this range
FREE, // Range is currently free
UNMAPPED, // Backing physical memory has been returned to the OS
- UNKNOWN,
+ UNKNOWN
// More enum values may be added in the future
};
diff -urP gperftools-2.0/src/gperftools/tcmalloc.h.in /home/spot/gperftools/src/gperftools/tcmalloc.h.in
--- gperftools-2.0/src/gperftools/tcmalloc.h.in 2012-02-03 14:18:23.000000000 -0500
+++ /home/spot/gperftools/src/gperftools/tcmalloc.h.in 2013-03-01 14:25:38.126366846 -0500
@@ -53,7 +53,17 @@
#define TC_VERSION_PATCH "@TC_VERSION_PATCH@"
#define TC_VERSION_STRING "gperftools @TC_VERSION_MAJOR@.@TC_VERSION_MINOR@@TC_VERSION_PATCH@"
-#include <stdlib.h> // for struct mallinfo, if it's defined
+// For struct mallinfo, if it's defined.
+#ifdef HAVE_STRUCT_MALLINFO
+// Malloc can be in several places on older versions of OS X.
+# if defined(HAVE_MALLOC_H)
+# include <malloc.h>
+# elif defined(HAVE_SYS_MALLOC_H)
+# include <sys/malloc.h>
+# elif defined(HAVE_MALLOC_MALLOC_H)
+# include <malloc/malloc.h>
+# endif
+#endif
// Annoying stuff for windows -- makes sure clients can import these functions
#ifndef PERFTOOLS_DLL_DECL
diff -urP gperftools-2.0/src/heap-checker.cc /home/spot/gperftools/src/heap-checker.cc
--- gperftools-2.0/src/heap-checker.cc 2012-02-03 14:18:22.000000000 -0500
+++ /home/spot/gperftools/src/heap-checker.cc 2013-03-01 14:25:38.722366824 -0500
@@ -567,7 +567,7 @@
if (ptr != NULL) {
const int counter = get_thread_disable_counter();
const bool ignore = (counter > 0);
- RAW_VLOG(16, "Recording Alloc: %p of %"PRIuS "; %d", ptr, size,
+ RAW_VLOG(16, "Recording Alloc: %p of %" PRIuS "; %d", ptr, size,
int(counter));
// Fetch the caller's stack trace before acquiring heap_checker_lock.
@@ -587,7 +587,7 @@
}
}
}
- RAW_VLOG(17, "Alloc Recorded: %p of %"PRIuS"", ptr, size);
+ RAW_VLOG(17, "Alloc Recorded: %p of %" PRIuS "", ptr, size);
}
}
@@ -645,12 +645,12 @@
if (MemoryRegionMap::FindAndMarkStackRegion(top, &region)) {
// Make the proper portion of the stack live:
if (stack_direction == GROWS_TOWARDS_LOW_ADDRESSES) {
- RAW_VLOG(11, "Live stack at %p of %"PRIuPTR" bytes",
+ RAW_VLOG(11, "Live stack at %p of %" PRIuPTR " bytes",
top_ptr, region.end_addr - top);
live_objects->push_back(AllocObject(top_ptr, region.end_addr - top,
THREAD_DATA));
} else { // GROWS_TOWARDS_HIGH_ADDRESSES
- RAW_VLOG(11, "Live stack at %p of %"PRIuPTR" bytes",
+ RAW_VLOG(11, "Live stack at %p of %" PRIuPTR " bytes",
AsPtr(region.start_addr),
top - region.start_addr);
live_objects->push_back(AllocObject(AsPtr(region.start_addr),
@@ -692,12 +692,12 @@
}
// Make the proper portion of the stack live:
if (stack_direction == GROWS_TOWARDS_LOW_ADDRESSES) {
- RAW_VLOG(11, "Live stack at %p of %"PRIuPTR" bytes",
+ RAW_VLOG(11, "Live stack at %p of %" PRIuPTR " bytes",
top_ptr, stack_end - top);
live_objects->push_back(
AllocObject(top_ptr, stack_end - top, THREAD_DATA));
} else { // GROWS_TOWARDS_HIGH_ADDRESSES
- RAW_VLOG(11, "Live stack at %p of %"PRIuPTR" bytes",
+ RAW_VLOG(11, "Live stack at %p of %" PRIuPTR " bytes",
AsPtr(stack_start), top - stack_start);
live_objects->push_back(
AllocObject(AsPtr(stack_start), top - stack_start, THREAD_DATA));
@@ -770,14 +770,14 @@
// and the rest of the region where the stack lives can well
// contain outdated stack variables which are not live anymore,
// hence should not be treated as such.
- RAW_VLOG(11, "Not %s-disabling %"PRIuS" bytes at %p"
+ RAW_VLOG(11, "Not %s-disabling %" PRIuS " bytes at %p"
": have stack inside: %p",
(stack_disable ? "stack" : "range"),
info.object_size, ptr, AsPtr(*iter));
return;
}
}
- RAW_VLOG(11, "%s-disabling %"PRIuS" bytes at %p",
+ RAW_VLOG(11, "%s-disabling %" PRIuS " bytes at %p",
(stack_disable ? "Stack" : "Range"), info.object_size, ptr);
live_objects->push_back(AllocObject(ptr, info.object_size,
MUST_BE_ON_HEAP));
@@ -1061,7 +1061,7 @@
if (thread_registers.size()) {
// Make thread registers be live heap data sources.
// we rely here on the fact that vector is in one memory chunk:
- RAW_VLOG(11, "Live registers at %p of %"PRIuS" bytes",
+ RAW_VLOG(11, "Live registers at %p of %" PRIuS " bytes",
&thread_registers[0], thread_registers.size() * sizeof(void*));
live_objects->push_back(AllocObject(&thread_registers[0],
thread_registers.size() * sizeof(void*),
@@ -1098,7 +1098,7 @@
for (IgnoredObjectsMap::const_iterator object = ignored_objects->begin();
object != ignored_objects->end(); ++object) {
const void* ptr = AsPtr(object->first);
- RAW_VLOG(11, "Ignored live object at %p of %"PRIuS" bytes",
+ RAW_VLOG(11, "Ignored live object at %p of %" PRIuS " bytes",
ptr, object->second);
live_objects->
push_back(AllocObject(ptr, object->second, MUST_BE_ON_HEAP));
@@ -1107,7 +1107,7 @@
size_t object_size;
if (!(heap_profile->FindAlloc(ptr, &object_size) &&
object->second == object_size)) {
- RAW_LOG(FATAL, "Object at %p of %"PRIuS" bytes from an"
+ RAW_LOG(FATAL, "Object at %p of %" PRIuS " bytes from an"
" IgnoreObject() has disappeared", ptr, object->second);
}
}
@@ -1214,7 +1214,7 @@
if (VLOG_IS_ON(11)) {
for (LiveObjectsStack::const_iterator i = l->second.begin();
i != l->second.end(); ++i) {
- RAW_VLOG(11, "Library live region at %p of %"PRIuPTR" bytes",
+ RAW_VLOG(11, "Library live region at %p of %" PRIuPTR " bytes",
i->ptr, i->size);
}
}
@@ -1335,7 +1335,7 @@
IgnoreNonThreadLiveObjectsLocked();
}
if (live_objects_total) {
- RAW_VLOG(10, "Ignoring %"PRId64" reachable objects of %"PRId64" bytes",
+ RAW_VLOG(10, "Ignoring %" PRId64 " reachable objects of %" PRId64 " bytes",
live_objects_total, live_bytes_total);
}
// Free these: we made them here and heap_profile never saw them
@@ -1394,7 +1394,7 @@
live_object_count += 1;
live_byte_count += size;
}
- RAW_VLOG(13, "Looking for heap pointers in %p of %"PRIuS" bytes",
+ RAW_VLOG(13, "Looking for heap pointers in %p of %" PRIuS " bytes",
object, size);
const char* const whole_object = object;
size_t const whole_size = size;
@@ -1465,8 +1465,8 @@
// a heap object which is in fact leaked.
// I.e. in very rare and probably not repeatable/lasting cases
// we might miss some real heap memory leaks.
- RAW_VLOG(14, "Found pointer to %p of %"PRIuS" bytes at %p "
- "inside %p of size %"PRIuS"",
+ RAW_VLOG(14, "Found pointer to %p of %" PRIuS " bytes at %p "
+ "inside %p of size %" PRIuS "",
ptr, object_size, object, whole_object, whole_size);
if (VLOG_IS_ON(15)) {
// log call stacks to help debug how come something is not a leak
@@ -1491,7 +1491,7 @@
live_objects_total += live_object_count;
live_bytes_total += live_byte_count;
if (live_object_count) {
- RAW_VLOG(10, "Removed %"PRId64" live heap objects of %"PRId64" bytes: %s%s",
+ RAW_VLOG(10, "Removed %" PRId64 " live heap objects of %" PRId64 " bytes: %s%s",
live_object_count, live_byte_count, name, name2);
}
}
@@ -1513,7 +1513,7 @@
if (!HaveOnHeapLocked(&ptr, &object_size)) {
RAW_LOG(ERROR, "No live heap object at %p to ignore", ptr);
} else {
- RAW_VLOG(10, "Going to ignore live object at %p of %"PRIuS" bytes",
+ RAW_VLOG(10, "Going to ignore live object at %p of %" PRIuS " bytes",
ptr, object_size);
if (ignored_objects == NULL) {
ignored_objects = new(Allocator::Allocate(sizeof(IgnoredObjectsMap)))
@@ -1540,7 +1540,7 @@
ignored_objects->erase(object);
found = true;
RAW_VLOG(10, "Now not going to ignore live object "
- "at %p of %"PRIuS" bytes", ptr, object_size);
+ "at %p of %" PRIuS " bytes", ptr, object_size);
}
}
if (!found) RAW_LOG(FATAL, "Object at %p has not been ignored", ptr);
@@ -1588,8 +1588,8 @@
const HeapProfileTable::Stats& t = heap_profile->total();
const size_t start_inuse_bytes = t.alloc_size - t.free_size;
const size_t start_inuse_allocs = t.allocs - t.frees;
- RAW_VLOG(10, "Start check \"%s\" profile: %"PRIuS" bytes "
- "in %"PRIuS" objects",
+ RAW_VLOG(10, "Start check \"%s\" profile: %" PRIuS " bytes "
+ "in %" PRIuS " objects",
name_, start_inuse_bytes, start_inuse_allocs);
} else {
RAW_LOG(WARNING, "Heap checker is not active, "
@@ -1813,7 +1813,7 @@
RAW_VLOG(heap_checker_info_level,
"No leaks found for check \"%s\" "
"(but no 100%% guarantee that there aren't any): "
- "found %"PRId64" reachable heap objects of %"PRId64" bytes",
+ "found %" PRId64 " reachable heap objects of %" PRId64 " bytes",
name_,
int64(stats.allocs - stats.frees),
int64(stats.alloc_size - stats.free_size));
@@ -2021,9 +2021,9 @@
// at the right time, on FreeBSD we always check after, even in the
// less strict modes. This just means FreeBSD is always a bit
// stricter in its checking than other OSes.
-#ifdef __FreeBSD__
+ // This now appears to be the case in other OSes as well;
+ // so always check afterwards.
FLAGS_heap_check_after_destructors = true;
-#endif
{ SpinLockHolder l(&heap_checker_lock);
RAW_DCHECK(heap_checker_pid == getpid(), "");
@@ -2353,7 +2353,7 @@
const uintptr_t addr = AsInt(*ptr);
if (heap_profile->FindInsideAlloc(
*ptr, max_heap_object_size, ptr, object_size)) {
- RAW_VLOG(16, "Got pointer into %p at +%"PRIuPTR" offset",
+ RAW_VLOG(16, "Got pointer into %p at +%" PRIuPTR " offset",
*ptr, addr - AsInt(*ptr));
return true;
}
diff -urP gperftools-2.0/src/heap-profiler.cc /home/spot/gperftools/src/heap-profiler.cc
--- gperftools-2.0/src/heap-profiler.cc 2012-02-03 14:18:22.000000000 -0500
+++ /home/spot/gperftools/src/heap-profiler.cc 2013-03-01 14:25:38.470366833 -0500
@@ -107,6 +107,10 @@
"If non-zero, dump heap profiling information whenever "
"the high-water memory usage mark increases by the specified "
"number of bytes.");
+DEFINE_int64(heap_profile_time_interval,
+ EnvToInt64("HEAP_PROFILE_TIME_INTERVAL", 0),
+ "If non-zero, dump heap profiling information once every "
+ "specified number of seconds since the last dump.");
DEFINE_bool(mmap_log,
EnvToBool("HEAP_PROFILE_MMAP_LOG", false),
"Should mmap/munmap calls be logged?");
@@ -168,6 +172,7 @@
static int64 last_dump_alloc = 0; // alloc_size when did we last dump
static int64 last_dump_free = 0; // free_size when did we last dump
static int64 high_water_mark = 0; // In-use-bytes at last high-water dump
+static int64 last_dump_time = 0; // The time of the last dump
static HeapProfileTable* heap_profile = NULL; // the heap profile table
@@ -264,26 +269,34 @@
const int64 inuse_bytes = total.alloc_size - total.free_size;
bool need_to_dump = false;
char buf[128];
+ int64 current_time = time(NULL);
if (FLAGS_heap_profile_allocation_interval > 0 &&
total.alloc_size >=
last_dump_alloc + FLAGS_heap_profile_allocation_interval) {
- snprintf(buf, sizeof(buf), ("%"PRId64" MB allocated cumulatively, "
- "%"PRId64" MB currently in use"),
+ snprintf(buf, sizeof(buf), ("%" PRId64 " MB allocated cumulatively, "
+ "%" PRId64 " MB currently in use"),
total.alloc_size >> 20, inuse_bytes >> 20);
need_to_dump = true;
} else if (FLAGS_heap_profile_deallocation_interval > 0 &&
total.free_size >=
last_dump_free + FLAGS_heap_profile_deallocation_interval) {
- snprintf(buf, sizeof(buf), ("%"PRId64" MB freed cumulatively, "
- "%"PRId64" MB currently in use"),
+ snprintf(buf, sizeof(buf), ("%" PRId64 " MB freed cumulatively, "
+ "%" PRId64 " MB currently in use"),
total.free_size >> 20, inuse_bytes >> 20);
need_to_dump = true;
} else if (FLAGS_heap_profile_inuse_interval > 0 &&
inuse_bytes >
high_water_mark + FLAGS_heap_profile_inuse_interval) {
- snprintf(buf, sizeof(buf), "%"PRId64" MB currently in use",
+ snprintf(buf, sizeof(buf), "%" PRId64 " MB currently in use",
inuse_bytes >> 20);
need_to_dump = true;
+ } else if (FLAGS_heap_profile_time_interval > 0 &&
+ current_time - last_dump_time >=
+ FLAGS_heap_profile_time_interval) {
+ snprintf(buf, sizeof(buf), "%d sec since the last dump",
+ current_time - last_dump_time);
+ need_to_dump = true;
+ last_dump_time = current_time;
}
if (need_to_dump) {
DumpProfileLocked(buf);
@@ -346,8 +359,8 @@
// in pretty-printing of NULL as "nil".
// TODO(maxim): instead should use a safe snprintf reimplementation
RAW_LOG(INFO,
- "mmap(start=0x%"PRIxPTR", len=%"PRIuS", prot=0x%x, flags=0x%x, "
- "fd=%d, offset=0x%x) = 0x%"PRIxPTR"",
+ "mmap(start=0x%" PRIxPTR ", len=%" PRIuS ", prot=0x%x, flags=0x%x, "
+ "fd=%d, offset=0x%x) = 0x%" PRIxPTR "",
(uintptr_t) start, size, prot, flags, fd, (unsigned int) offset,
(uintptr_t) result);
#ifdef TODO_REENABLE_STACK_TRACING
@@ -364,9 +377,9 @@
// in pretty-printing of NULL as "nil".
// TODO(maxim): instead should use a safe snprintf reimplementation
RAW_LOG(INFO,
- "mremap(old_addr=0x%"PRIxPTR", old_size=%"PRIuS", "
- "new_size=%"PRIuS", flags=0x%x, new_addr=0x%"PRIxPTR") = "
- "0x%"PRIxPTR"",
+ "mremap(old_addr=0x%" PRIxPTR ", old_size=%" PRIuS ", "
+ "new_size=%" PRIuS ", flags=0x%x, new_addr=0x%" PRIxPTR ") = "
+ "0x%" PRIxPTR "",
(uintptr_t) old_addr, old_size, new_size, flags,
(uintptr_t) new_addr, (uintptr_t) result);
#ifdef TODO_REENABLE_STACK_TRACING
@@ -380,7 +393,7 @@
// We use PRIxS not just '%p' to avoid deadlocks
// in pretty-printing of NULL as "nil".
// TODO(maxim): instead should use a safe snprintf reimplementation
- RAW_LOG(INFO, "munmap(start=0x%"PRIxPTR", len=%"PRIuS")",
+ RAW_LOG(INFO, "munmap(start=0x%" PRIxPTR ", len=%" PRIuS ")",
(uintptr_t) ptr, size);
#ifdef TODO_REENABLE_STACK_TRACING
DumpStackTrace(1, RawInfoStackDumper, NULL);
@@ -390,7 +403,7 @@
static void SbrkHook(const void* result, ptrdiff_t increment) {
if (FLAGS_mmap_log) { // log it
- RAW_LOG(INFO, "sbrk(inc=%"PRIdS") = 0x%"PRIxPTR"",
+ RAW_LOG(INFO, "sbrk(inc=%" PRIdS ") = 0x%" PRIxPTR "",
increment, (uintptr_t) result);
#ifdef TODO_REENABLE_STACK_TRACING
DumpStackTrace(1, RawInfoStackDumper, NULL);
@@ -447,6 +460,7 @@
last_dump_alloc = 0;
last_dump_free = 0;
high_water_mark = 0;
+ last_dump_time = 0;
// We do not reset dump_count so if the user does a sequence of
// HeapProfilerStart/HeapProfileStop, we will get a continuous
diff -urP gperftools-2.0/src/heap-profile-table.cc /home/spot/gperftools/src/heap-profile-table.cc
--- gperftools-2.0/src/heap-profile-table.cc 2012-02-03 14:18:22.000000000 -0500
+++ /home/spot/gperftools/src/heap-profile-table.cc 2013-03-01 14:25:38.125366846 -0500
@@ -303,7 +303,7 @@
profile_stats->free_size += b.free_size;
}
int printed =
- snprintf(buf + buflen, bufsize - buflen, "%6d: %8"PRId64" [%6d: %8"PRId64"] @%s",
+ snprintf(buf + buflen, bufsize - buflen, "%6d: %8" PRId64 " [%6d: %8" PRId64 "] @%s",
b.allocs - b.frees,
b.alloc_size - b.free_size,
b.allocs,
@@ -616,8 +616,8 @@
// This is only used by the heap leak checker, but is intimately
// tied to the allocation map that belongs in this module and is
// therefore placed here.
- RAW_LOG(ERROR, "Leak check %s detected leaks of %"PRIuS" bytes "
- "in %"PRIuS" objects",
+ RAW_LOG(ERROR, "Leak check %s detected leaks of %" PRIuS " bytes "
+ "in %" PRIuS " objects",
checker_name,
size_t(total_.alloc_size),
size_t(total_.allocs));
@@ -663,7 +663,7 @@
e.bytes, e.count);
for (int j = 0; j < e.bucket->depth; j++) {
const void* pc = e.bucket->stack[j];
- printer.Printf("\t@ %"PRIxPTR" %s\n",
+ printer.Printf("\t@ %" PRIxPTR " %s\n",
reinterpret_cast<uintptr_t>(pc), symbolization_table.GetSymbol(pc));
}
RAW_LOG(ERROR, "%s", buffer);
@@ -687,7 +687,7 @@
char* unused) {
// Perhaps also log the allocation stack trace (unsymbolized)
// on this line in case somebody finds it useful.
- RAW_LOG(ERROR, "leaked %"PRIuS" byte object %p", v->bytes, ptr);
+ RAW_LOG(ERROR, "leaked %" PRIuS " byte object %p", v->bytes, ptr);
}
void HeapProfileTable::Snapshot::ReportIndividualObjects() {
diff -urP gperftools-2.0/src/malloc_extension.cc /home/spot/gperftools/src/malloc_extension.cc
--- gperftools-2.0/src/malloc_extension.cc 2012-02-03 14:18:22.000000000 -0500
+++ /home/spot/gperftools/src/malloc_extension.cc 2013-03-01 14:25:38.471366833 -0500
@@ -244,7 +244,7 @@
uintptr_t count, uintptr_t size) {
char buf[100];
snprintf(buf, sizeof(buf),
- "%6"PRIu64": %8"PRIu64" [%6"PRIu64": %8"PRIu64"] @",
+ "%6" PRIu64 ": %8" PRIu64 " [%6" PRIu64 ": %8" PRIu64 "] @",
static_cast<uint64>(count),
static_cast<uint64>(size),
static_cast<uint64>(count),
diff -urP gperftools-2.0/src/malloc_hook-inl.h /home/spot/gperftools/src/malloc_hook-inl.h
--- gperftools-2.0/src/malloc_hook-inl.h 2012-02-03 14:18:22.000000000 -0500
+++ /home/spot/gperftools/src/malloc_hook-inl.h 2013-03-01 14:25:38.474366833 -0500
@@ -66,7 +66,7 @@
// This prevents MSVC 2005, at least, from complaining (it has to
// do with __wp64; AtomicWord is __wp64, but Atomic32/64 aren't).
return reinterpret_cast<PtrT>(static_cast<AtomicWord>(
- base::subtle::Acquire_Load(&data_)));
+ base::subtle::NoBarrier_Load(&data_)));
}
// Sets the contained value to new_val and returns the old value,
@@ -124,7 +124,7 @@
// Fast inline implementation for fast path of Invoke*Hook.
bool empty() const {
- return base::subtle::Acquire_Load(&priv_end) == 0;
+ return base::subtle::NoBarrier_Load(&priv_end) == 0;
}
// This internal data is not private so that the class is an aggregate and can
diff -urP gperftools-2.0/src/memory_region_map.cc /home/spot/gperftools/src/memory_region_map.cc
--- gperftools-2.0/src/memory_region_map.cc 2012-02-03 14:18:22.000000000 -0500
+++ /home/spot/gperftools/src/memory_region_map.cc 2013-03-01 14:25:38.720366824 -0500
@@ -512,7 +512,7 @@
uintptr_t start_addr = reinterpret_cast<uintptr_t>(start);
uintptr_t end_addr = start_addr + size;
// subtract start_addr, end_addr from all the regions
- RAW_VLOG(10, "Removing global region %p..%p; have %"PRIuS" regions",
+ RAW_VLOG(10, "Removing global region %p..%p; have %" PRIuS " regions",
reinterpret_cast<void*>(start_addr),
reinterpret_cast<void*>(end_addr),
regions_->size());
@@ -571,7 +571,7 @@
}
++region;
}
- RAW_VLOG(12, "Removed region %p..%p; have %"PRIuS" regions",
+ RAW_VLOG(12, "Removed region %p..%p; have %" PRIuS " regions",
reinterpret_cast<void*>(start_addr),
reinterpret_cast<void*>(end_addr),
regions_->size());
@@ -584,10 +584,10 @@
const void* start, size_t size,
int prot, int flags,
int fd, off_t offset) {
- // TODO(maxim): replace all 0x%"PRIxS" by %p when RAW_VLOG uses a safe
+ // TODO(maxim): replace all 0x%" PRIxS " by %p when RAW_VLOG uses a safe
// snprintf reimplementation that does not malloc to pretty-print NULL
- RAW_VLOG(10, "MMap = 0x%"PRIxPTR" of %"PRIuS" at %"PRIu64" "
- "prot %d flags %d fd %d offs %"PRId64,
+ RAW_VLOG(10, "MMap = 0x%" PRIxPTR " of %" PRIuS " at %" PRIu64 " "
+ "prot %d flags %d fd %d offs %" PRId64,
reinterpret_cast<uintptr_t>(result), size,
reinterpret_cast<uint64>(start), prot, flags, fd,
static_cast<int64>(offset));
@@ -597,7 +597,7 @@
}
void MemoryRegionMap::MunmapHook(const void* ptr, size_t size) {
- RAW_VLOG(10, "MUnmap of %p %"PRIuS"", ptr, size);
+ RAW_VLOG(10, "MUnmap of %p %" PRIuS "", ptr, size);
if (size != 0) {
RecordRegionRemoval(ptr, size);
}
@@ -607,8 +607,8 @@
const void* old_addr, size_t old_size,
size_t new_size, int flags,
const void* new_addr) {
- RAW_VLOG(10, "MRemap = 0x%"PRIxPTR" of 0x%"PRIxPTR" %"PRIuS" "
- "to %"PRIuS" flags %d new_addr=0x%"PRIxPTR,
+ RAW_VLOG(10, "MRemap = 0x%" PRIxPTR " of 0x%" PRIxPTR " %" PRIuS " "
+ "to %" PRIuS " flags %d new_addr=0x%" PRIxPTR,
(uintptr_t)result, (uintptr_t)old_addr,
old_size, new_size, flags,
flags & MREMAP_FIXED ? (uintptr_t)new_addr : 0);
@@ -621,7 +621,7 @@
extern "C" void* __sbrk(ptrdiff_t increment); // defined in libc
void MemoryRegionMap::SbrkHook(const void* result, ptrdiff_t increment) {
- RAW_VLOG(10, "Sbrk = 0x%"PRIxPTR" of %"PRIdS"", (uintptr_t)result, increment);
+ RAW_VLOG(10, "Sbrk = 0x%" PRIxPTR " of %" PRIdS "", (uintptr_t)result, increment);
if (result != reinterpret_cast<void*>(-1)) {
if (increment > 0) {
void* new_end = sbrk(0);
@@ -641,8 +641,8 @@
uintptr_t previous = 0;
for (RegionSet::const_iterator r = regions_->begin();
r != regions_->end(); ++r) {
- RAW_LOG(INFO, "Memory region 0x%"PRIxPTR"..0x%"PRIxPTR" "
- "from 0x%"PRIxPTR" stack=%d",
+ RAW_LOG(INFO, "Memory region 0x%" PRIxPTR "..0x%" PRIxPTR " "
+ "from 0x%" PRIxPTR " stack=%d",
r->start_addr, r->end_addr, r->caller(), r->is_stack);
RAW_CHECK(previous < r->end_addr, "wow, we messed up the set order");
// this must be caused by uncontrolled recursive operations on regions_
diff -urP gperftools-2.0/src/page_heap.cc /home/spot/gperftools/src/page_heap.cc
--- gperftools-2.0/src/page_heap.cc 2012-02-03 14:18:22.000000000 -0500
+++ /home/spot/gperftools/src/page_heap.cc 2013-03-01 14:25:38.473366833 -0500
@@ -50,6 +50,14 @@
"to return memory slower. Reasonable rates are in the "
"range [0,10]");
+DEFINE_int64(tcmalloc_heap_limit_mb,
+ EnvToInt("TCMALLOC_HEAP_LIMIT_MB", 0),
+ "Limit total size of the process heap to the "
+ "specified number of MiB. "
+ "When we approach the limit the memory is released "
+ "to the system more aggressively (more minor page faults). "
+ "Zero means to allocate as long as system allows.");
+
namespace tcmalloc {
PageHeap::PageHeap()
@@ -82,8 +90,18 @@
// Alternatively, maybe there's a usable returned span.
ll = &free_[s].returned;
if (!DLL_IsEmpty(ll)) {
- ASSERT(ll->next->location == Span::ON_RETURNED_FREELIST);
- return Carve(ll->next, n);
+ // We did not call EnsureLimit before, to avoid releasing the span
+ // that will be taken immediately back.
+ // Calling EnsureLimit here is not very expensive, as it fails only if
+ // there is no more normal spans (and it fails efficiently)
+ // or SystemRelease does not work (there is probably no returned spans).
+ if (EnsureLimit(n)) {
+ // ll may have became empty due to coalescing
+ if (!DLL_IsEmpty(ll)) {
+ ASSERT(ll->next->location == Span::ON_RETURNED_FREELIST);
+ return Carve(ll->next, n);
+ }
+ }
}
}
// No luck in free lists, our last chance is in a larger class.
@@ -125,6 +143,8 @@
}
}
+ Span *bestNormal = best;
+
// Search through released list in case it has a better fit
for (Span* span = large_.returned.next;
span != &large_.returned;
@@ -139,7 +159,27 @@
}
}
- return best == NULL ? NULL : Carve(best, n);
+ if (best == bestNormal) {
+ return best == NULL ? NULL : Carve(best, n);
+ }
+
+ // best comes from returned list.
+
+ if (EnsureLimit(n, false)) {
+ return Carve(best, n);
+ }
+
+ if (EnsureLimit(n, true)) {
+ // best could have been destroyed by coalescing.
+ // bestNormal is not a best-fit, and it could be destroyed as well.
+ // We retry, the limit is already ensured:
+ return AllocLarge(n);
+ }
+
+ // If bestNormal existed, EnsureLimit would succeeded:
+ ASSERT(bestNormal == NULL);
+ // We are not allowed to take best from returned list.
+ return NULL;
}
Span* PageHeap::Split(Span* span, Length n) {
@@ -294,28 +334,26 @@
Length PageHeap::ReleaseLastNormalSpan(SpanList* slist) {
Span* s = slist->normal.prev;
ASSERT(s->location == Span::ON_NORMAL_FREELIST);
- RemoveFromFreeList(s);
- const Length n = s->length;
- TCMalloc_SystemRelease(reinterpret_cast<void*>(s->start << kPageShift),
- static_cast<size_t>(s->length << kPageShift));
- s->location = Span::ON_RETURNED_FREELIST;
- MergeIntoFreeList(s); // Coalesces if possible.
- return n;
+
+ if (TCMalloc_SystemRelease(reinterpret_cast<void*>(s->start << kPageShift),
+ static_cast<size_t>(s->length << kPageShift))) {
+ RemoveFromFreeList(s);
+ const Length n = s->length;
+ s->location = Span::ON_RETURNED_FREELIST;
+ MergeIntoFreeList(s); // Coalesces if possible.
+ return n;
+ }
+
+ return 0;
}
Length PageHeap::ReleaseAtLeastNPages(Length num_pages) {
Length released_pages = 0;
- Length prev_released_pages = -1;
// Round robin through the lists of free spans, releasing the last
- // span in each list. Stop after releasing at least num_pages.
- while (released_pages < num_pages) {
- if (released_pages == prev_released_pages) {
- // Last iteration of while loop made no progress.
- break;
- }
- prev_released_pages = released_pages;
-
+ // span in each list. Stop after releasing at least num_pages
+ // or when there is nothing more to release.
+ while (released_pages < num_pages && stats_.free_bytes > 0) {
for (int i = 0; i < kMaxPages+1 && released_pages < num_pages;
i++, release_index_++) {
if (release_index_ > kMaxPages) release_index_ = 0;
@@ -323,6 +361,8 @@
&large_ : &free_[release_index_];
if (!DLL_IsEmpty(&slist->normal)) {
Length released_len = ReleaseLastNormalSpan(slist);
+ // Some systems do not support release
+ if (released_len == 0) return released_pages;
released_pages += released_len;
}
}
@@ -330,6 +370,30 @@
return released_pages;
}
+bool PageHeap::EnsureLimit(Length n, bool withRelease)
+{
+ Length limit = (FLAGS_tcmalloc_heap_limit_mb*1024*1024) >> kPageShift;
+ if (limit == 0) return true; //there is no limit
+
+ // We do not use stats_.system_bytes because it does not take
+ // MetaDataAllocs into account.
+ Length takenPages = TCMalloc_SystemTaken >> kPageShift;
+ //XXX takenPages may be slightly bigger than limit for two reasons:
+ //* MetaDataAllocs ignore the limit (it is not easy to handle
+ // out of memory there)
+ //* sys_alloc may round allocation up to huge page size,
+ // although smaller limit was ensured
+
+ ASSERT(takenPages >= stats_.unmapped_bytes >> kPageShift);
+ takenPages -= stats_.unmapped_bytes >> kPageShift;
+
+ if (takenPages + n > limit && withRelease) {
+ takenPages -= ReleaseAtLeastNPages(takenPages + n - limit);
+ }
+
+ return takenPages + n <= limit;
+}
+
void PageHeap::RegisterSizeClass(Span* span, size_t sc) {
// Associate span object with all interior pages as well
ASSERT(span->location == Span::IN_USE);
@@ -407,12 +471,17 @@
if (n > kMaxValidPages) return false;
Length ask = (n>kMinSystemAlloc) ? n : static_cast<Length>(kMinSystemAlloc);
size_t actual_size;
- void* ptr = TCMalloc_SystemAlloc(ask << kPageShift, &actual_size, kPageSize);
+ void* ptr = NULL;
+ if (EnsureLimit(ask)) {
+ ptr = TCMalloc_SystemAlloc(ask << kPageShift, &actual_size, kPageSize);
+ }
if (ptr == NULL) {
if (n < ask) {
// Try growing just "n" pages
ask = n;
- ptr = TCMalloc_SystemAlloc(ask << kPageShift, &actual_size, kPageSize);
+ if (EnsureLimit(ask)) {
+ ptr = TCMalloc_SystemAlloc(ask << kPageShift, &actual_size, kPageSize);
+ }
}
if (ptr == NULL) return false;
}
diff -urP gperftools-2.0/src/page_heap.h /home/spot/gperftools/src/page_heap.h
--- gperftools-2.0/src/page_heap.h 2012-02-03 14:18:22.000000000 -0500
+++ /home/spot/gperftools/src/page_heap.h 2013-03-01 14:25:38.072366848 -0500
@@ -274,9 +274,13 @@
void IncrementalScavenge(Length n);
// Release the last span on the normal portion of this list.
- // Return the length of that span.
+ // Return the length of that span or zero if release failed.
Length ReleaseLastNormalSpan(SpanList* slist);
+ // Checks if we are allowed to take more memory from the system.
+ // If limit is reached and allowRelease is true, tries to release
+ // some unused spans.
+ bool EnsureLimit(Length n, bool allowRelease = true);
// Number of pages to deallocate before doing more scavenging
int64_t scavenge_counter_;
diff -urP gperftools-2.0/src/pprof /home/spot/gperftools/src/pprof
--- gperftools-2.0/src/pprof 2012-02-03 18:39:48.000000000 -0500
+++ /home/spot/gperftools/src/pprof 2013-03-01 14:25:37.971366851 -0500
@@ -285,7 +285,6 @@
my $msg = shift;
print STDERR "$msg\n\n";
print STDERR usage_string();
- print STDERR "\nFATAL ERROR: $msg\n"; # just as a reminder
exit(1);
}
diff -urP gperftools-2.0/src/profiler.cc /home/spot/gperftools/src/profiler.cc
--- gperftools-2.0/src/profiler.cc 2012-02-03 14:18:22.000000000 -0500
+++ /home/spot/gperftools/src/profiler.cc 2013-03-01 14:25:38.206366843 -0500
@@ -70,8 +70,21 @@
using std::string;
-// Collects up all profile data. This is a singleton, which is
-// initialized by a constructor at startup.
+DEFINE_bool(cpu_profiler_unittest,
+ EnvToBool("PERFTOOLS_UNITTEST", true),
+ "Determines whether or not we are running under the \
+ control of a unit test. This allows us to include or \
+ exclude certain behaviours.");
+
+// Collects up all profile data. This is a singleton, which is
+// initialized by a constructor at startup. If no cpu profiler
+// signal is specified then the profiler lifecycle is either
+// manaully controlled via the API or attached to the scope of
+// the singleton (program scope). Otherwise the cpu toggle is
+// used to allow for user selectable control via signal generation.
+// This is very useful for profiling a daemon process without
+// having to start and stop the daemon or having to modify the
+// source code to use the cpu profiler API.
class CpuProfiler {
public:
CpuProfiler();
@@ -126,6 +139,40 @@
void* cpu_profiler);
};
+// Signal handler that is registered when a user selectable signal
+// number is defined in the environment variable CPUPROFILESIGNAL.
+static void CpuProfilerSwitch(int signal_number)
+{
+ bool static started = false;
+ static unsigned profile_count = 0;
+ static char base_profile_name[1024] = "\0";
+
+ if (base_profile_name[0] == '\0') {
+ if (!GetUniquePathFromEnv("CPUPROFILE", base_profile_name)) {
+ RAW_LOG(FATAL,"Cpu profiler switch is registered but no CPUPROFILE is defined");
+ return;
+ }
+ }
+ if (!started)
+ {
+ char full_profile_name[1024];
+
+ snprintf(full_profile_name, sizeof(full_profile_name), "%s.%u",
+ base_profile_name, profile_count++);
+
+ if(!ProfilerStart(full_profile_name))
+ {
+ RAW_LOG(FATAL, "Can't turn on cpu profiling for '%s': %s\n",
+ full_profile_name, strerror(errno));
+ }
+ }
+ else
+ {
+ ProfilerStop();
+ }
+ started = !started;
+}
+
// Profile data structure singleton: Constructor will check to see if
// profiling should be enabled. Destructor will write profile data
// out to disk.
@@ -137,19 +184,60 @@
// TODO(cgd) Move this code *out* of the CpuProfile constructor into a
// separate object responsible for initialization. With ProfileHandler there
// is no need to limit the number of profilers.
- char fname[PATH_MAX];
- if (!GetUniquePathFromEnv("CPUPROFILE", fname)) {
+ if (getenv("CPUPROFILE") == NULL) {
+ if (!FLAGS_cpu_profiler_unittest) {
+ RAW_LOG(WARNING, "CPU profiler linked but no valid CPUPROFILE environment variable found\n");
+ }
return;
}
+
// We don't enable profiling if setuid -- it's a security risk
#ifdef HAVE_GETEUID
- if (getuid() != geteuid())
+ if (getuid() != geteuid()) {
+ if (!FLAGS_cpu_profiler_unittest) {
+ RAW_LOG(WARNING, "Cannot perform CPU profiling when running with setuid\n");
+ }
return;
+ }
#endif
- if (!Start(fname, NULL)) {
- RAW_LOG(FATAL, "Can't turn on cpu profiling for '%s': %s\n",
- fname, strerror(errno));
+ char *signal_number_str = getenv("CPUPROFILESIGNAL");
+ if (signal_number_str != NULL)
+ {
+ long int signal_number = strtol(signal_number_str, NULL, 10);
+ printf("<debug> signal_number=%d\n", signal_number);
+ if (signal_number >=1 && signal_number <=64)
+ {
+ sighandler_t old_signal_handler = signal(signal_number, CpuProfilerSwitch);
+ if (old_signal_handler == NULL)
+ {
+ RAW_LOG(INFO,"Using signal %d as cpu profiling switch", signal_number);
+
+ }
+ else
+ {
+ RAW_LOG(FATAL, "Signal %d already in use\n", signal_number);
+ }
+ }
+ else
+ {
+ RAW_LOG(FATAL, "Signal number %s is invalid\n", signal_number_str);
+ }
+ }
+ else
+ {
+ char fname[PATH_MAX];
+ if (!GetUniquePathFromEnv("CPUPROFILE", fname)) {
+ if (!FLAGS_cpu_profiler_unittest) {
+ RAW_LOG(WARNING, "CPU profiler linked but no valid CPUPROFILE environment variable found\n");
+ }
+ return;
+ }
+
+ if (!Start(fname, NULL)) {
+ RAW_LOG(FATAL, "Can't turn on cpu profiling for '%s': %s\n",
+ fname, strerror(errno));
+ }
}
}
diff -urP gperftools-2.0/src/static_vars.h /home/spot/gperftools/src/static_vars.h
--- gperftools-2.0/src/static_vars.h 2012-02-02 16:36:23.000000000 -0500
+++ /home/spot/gperftools/src/static_vars.h 2013-03-01 14:25:38.720366824 -0500
@@ -82,6 +82,9 @@
return &bucket_allocator_;
}
+ // Check if InitStaticVars() has been run.
+ static bool IsInited() { return pageheap() != NULL; }
+
private:
static SpinLock pageheap_lock_;
diff -urP gperftools-2.0/src/symbolize.cc /home/spot/gperftools/src/symbolize.cc
--- gperftools-2.0/src/symbolize.cc 2012-02-02 16:36:23.000000000 -0500
+++ /home/spot/gperftools/src/symbolize.cc 2013-03-01 14:25:38.474366833 -0500
@@ -229,7 +229,7 @@
iter != symbolization_table_.end(); ++iter) {
written += snprintf(pprof_buffer + written, kOutBufSize - written,
// pprof expects format to be 0xXXXXXX
- "0x%"PRIxPTR"\n", reinterpret_cast<uintptr_t>(iter->first));
+ "0x%" PRIxPTR "\n", reinterpret_cast<uintptr_t>(iter->first));
}
write(child_in[1], pprof_buffer, strlen(pprof_buffer));
close(child_in[1]); // that's all we need to write
diff -urP gperftools-2.0/src/system-alloc.cc /home/spot/gperftools/src/system-alloc.cc
--- gperftools-2.0/src/system-alloc.cc 2012-02-03 14:18:23.000000000 -0500
+++ /home/spot/gperftools/src/system-alloc.cc 2013-03-01 14:25:38.721366824 -0500
@@ -122,6 +122,9 @@
// The current system allocator
SysAllocator* sys_alloc = NULL;
+// Number of bytes taken from system.
+size_t TCMalloc_SystemTaken = 0;
+
// Configuration parameters.
DEFINE_int32(malloc_devmem_start,
EnvToInt("TCMALLOC_DEVMEM_START", 0),
@@ -137,6 +140,10 @@
DEFINE_bool(malloc_skip_mmap,
EnvToBool("TCMALLOC_SKIP_MMAP", false),
"Whether mmap can be used to obtain memory.");
+DEFINE_bool(malloc_disable_memory_release,
+ EnvToBool("TCMALLOC_DISABLE_MEMORY_RELEASE", false),
+ "Whether MADV_FREE/MADV_DONTNEED should be used"
+ " to return unused memory to the system.");
// static allocators
class SbrkSysAllocator : public SysAllocator {
@@ -442,6 +449,12 @@
return NULL;
}
+ATTRIBUTE_WEAK ATTRIBUTE_NOINLINE
+SysAllocator *tc_get_sysalloc_override(SysAllocator *def)
+{
+ return def;
+}
+
static bool system_alloc_inited = false;
void InitSystemAllocators(void) {
MmapSysAllocator *mmap = new (mmap_space) MmapSysAllocator();
@@ -462,7 +475,8 @@
sdef->SetChildAllocator(sbrk, 0, sbrk_name);
sdef->SetChildAllocator(mmap, 1, mmap_name);
}
- sys_alloc = sdef;
+
+ sys_alloc = tc_get_sysalloc_override(sdef);
}
void* TCMalloc_SystemAlloc(size_t size, size_t *actual_size,
@@ -485,21 +499,24 @@
if (actual_size) {
CheckAddressBits<kAddressBits>(
reinterpret_cast<uintptr_t>(result) + *actual_size - 1);
+ TCMalloc_SystemTaken += *actual_size;
} else {
CheckAddressBits<kAddressBits>(
reinterpret_cast<uintptr_t>(result) + size - 1);
+ TCMalloc_SystemTaken += size;
}
}
return result;
}
-void TCMalloc_SystemRelease(void* start, size_t length) {
+bool TCMalloc_SystemRelease(void* start, size_t length) {
#ifdef MADV_FREE
if (FLAGS_malloc_devmem_start) {
// It's not safe to use MADV_FREE/MADV_DONTNEED if we've been
// mapping /dev/mem for heap memory.
- return;
+ return false;
}
+ if (FLAGS_malloc_disable_memory_release) return false;
if (pagesize == 0) pagesize = getpagesize();
const size_t pagemask = pagesize - 1;
@@ -518,13 +535,14 @@
ASSERT(new_end <= end);
if (new_end > new_start) {
- // Note -- ignoring most return codes, because if this fails it
- // doesn't matter...
- while (madvise(reinterpret_cast<char*>(new_start), new_end - new_start,
- MADV_FREE) == -1 &&
- errno == EAGAIN) {
- // NOP
- }
+ int result;
+ do {
+ result = madvise(reinterpret_cast<char*>(new_start),
+ new_end - new_start, MADV_FREE);
+ } while (result == -1 && errno == EAGAIN);
+
+ return result != -1;
}
#endif
+ return false;
}
diff -urP gperftools-2.0/src/system-alloc.h /home/spot/gperftools/src/system-alloc.h
--- gperftools-2.0/src/system-alloc.h 2012-02-02 16:36:23.000000000 -0500
+++ /home/spot/gperftools/src/system-alloc.h 2013-03-01 14:25:38.474366833 -0500
@@ -69,9 +69,14 @@
// the address space next time they are touched, which can impact
// performance. (Only pages fully covered by the memory region will
// be released, partial pages will not.)
-extern void TCMalloc_SystemRelease(void* start, size_t length);
+//
+// Returns false if release failed or not supported.
+extern bool TCMalloc_SystemRelease(void* start, size_t length);
// The current system allocator.
extern PERFTOOLS_DLL_DECL SysAllocator* sys_alloc;
+// Number of bytes taken from system.
+extern PERFTOOLS_DLL_DECL size_t TCMalloc_SystemTaken;
+
#endif /* TCMALLOC_SYSTEM_ALLOC_H_ */
diff -urP gperftools-2.0/src/tcmalloc.cc /home/spot/gperftools/src/tcmalloc.cc
--- gperftools-2.0/src/tcmalloc.cc 2012-02-03 14:18:23.000000000 -0500
+++ /home/spot/gperftools/src/tcmalloc.cc 2013-03-01 14:25:37.968366851 -0500
@@ -131,18 +131,6 @@
#include "tcmalloc_guard.h" // for TCMallocGuard
#include "thread_cache.h" // for ThreadCache
-// We only need malloc.h for struct mallinfo.
-#ifdef HAVE_STRUCT_MALLINFO
-// Malloc can be in several places on older versions of OS X.
-# if defined(HAVE_MALLOC_H)
-# include <malloc.h>
-# elif defined(HAVE_SYS_MALLOC_H)
-# include <sys/malloc.h>
-# elif defined(HAVE_MALLOC_MALLOC_H)
-# include <malloc/malloc.h>
-# endif
-#endif
-
#if (defined(_WIN32) && !defined(__CYGWIN__) && !defined(__CYGWIN32__)) && !defined(WIN32_OVERRIDE_ALLOCATORS)
# define WIN32_DO_PATCHING 1
#endif
@@ -311,7 +299,10 @@
PageHeap::Stats pageheap; // Stats from page heap
};
-// Get stats into "r". Also get per-size-class counts if class_count != NULL
+// Get stats into "r". Also, if class_count != NULL, class_count[k]
+// will be set to the total number of objects of size class k in the
+// central cache, transfer cache, and per-thread caches. If small_spans
+// is non-NULL, it is filled. Same for large_spans.
static void ExtractStats(TCMallocStats* r, uint64_t* class_count,
PageHeap::SmallSpanStats* small_spans,
PageHeap::LargeSpanStats* large_spans) {
@@ -325,7 +316,12 @@
Static::sizemap()->ByteSizeForClass(cl));
r->central_bytes += (size * length) + cache_overhead;
r->transfer_bytes += (size * tc_length);
- if (class_count) class_count[cl] = length + tc_length;
+ if (class_count) {
+ // Sum the lengths of all per-class freelists, except the per-thread
+ // freelists, which get counted when we call GetThreadStats(), below.
+ class_count[cl] = length + tc_length;
+ }
+
}
// Add stats from per-thread heaps
@@ -414,7 +410,8 @@
if (level >= 2) {
out->printf("------------------------------------------------\n");
- out->printf("Size class breakdown\n");
+ out->printf("Total size of freelists for per-thread caches,\n");
+ out->printf("transfer cache, and central cache, by size class\n");
out->printf("------------------------------------------------\n");
uint64_t cumulative = 0;
for (int cl = 0; cl < kNumClasses; ++cl) {
@@ -656,6 +653,27 @@
return true;
}
+ if (strcmp(name, "tcmalloc.central_cache_free_bytes") == 0) {
+ TCMallocStats stats;
+ ExtractStats(&stats, NULL, NULL, NULL);
+ *value = stats.central_bytes;
+ return true;
+ }
+
+ if (strcmp(name, "tcmalloc.transfer_cache_free_bytes") == 0) {
+ TCMallocStats stats;
+ ExtractStats(&stats, NULL, NULL, NULL);
+ *value = stats.transfer_bytes;
+ return true;
+ }
+
+ if (strcmp(name, "tcmalloc.thread_cache_free_bytes") == 0) {
+ TCMallocStats stats;
+ ExtractStats(&stats, NULL, NULL, NULL);
+ *value = stats.thread_bytes;
+ return true;
+ }
+
if (strcmp(name, "tcmalloc.pageheap_free_bytes") == 0) {
SpinLockHolder l(Static::pageheap_lock());
*value = Static::pageheap()->stats().free_bytes;
@@ -951,13 +969,13 @@
SpinLockHolder h(Static::pageheap_lock());
// Allocate span
Span *span = Static::pageheap()->New(tcmalloc::pages(size == 0 ? 1 : size));
- if (span == NULL) {
+ if (UNLIKELY(span == NULL)) {
return NULL;
}
// Allocate stack trace
StackTrace *stack = Static::stacktrace_allocator()->New();
- if (stack == NULL) {
+ if (UNLIKELY(stack == NULL)) {
// Sampling failed because of lack of memory
return span;
}
@@ -984,7 +1002,7 @@
static const int N = 1000;
char buffer[N];
TCMalloc_Printer printer(buffer, N);
- printer.printf("tcmalloc: large alloc %"PRIu64" bytes == %p @ ",
+ printer.printf("tcmalloc: large alloc %" PRIu64 " bytes == %p @ ",
static_cast<uint64>(num_pages) << kPageShift,
result);
for (int i = 0; i < stack.depth; i++) {
@@ -996,6 +1014,7 @@
inline void* cpp_alloc(size_t size, bool nothrow);
inline void* do_malloc(size_t size);
+inline void* do_malloc_no_errno(size_t size);
// TODO(willchan): Investigate whether or not lining this much is harmful to
// performance.
@@ -1005,6 +1024,10 @@
return tc_new_mode ? cpp_alloc(size, true) : do_malloc(size);
}
+inline void* do_malloc_no_errno_or_cpp_alloc(size_t size) {
+ return tc_new_mode ? cpp_alloc(size, true) : do_malloc_no_errno(size);
+}
+
void* cpp_memalign(size_t align, size_t size);
void* do_memalign(size_t align, size_t size);
@@ -1041,7 +1064,7 @@
} else {
SpinLockHolder h(Static::pageheap_lock());
Span* span = Static::pageheap()->New(num_pages);
- result = (span == NULL ? NULL : SpanToMallocResult(span));
+ result = (UNLIKELY(span == NULL) ? NULL : SpanToMallocResult(span));
report_large = should_report_large(num_pages);
}
@@ -1051,26 +1074,35 @@
return result;
}
-inline void* do_malloc(size_t size) {
- void* ret = NULL;
+inline void* do_malloc_small(ThreadCache* heap, size_t size) {
+ ASSERT(Static::IsInited());
+ ASSERT(heap != NULL);
+ size_t cl = Static::sizemap()->SizeClass(size);
+ size = Static::sizemap()->class_to_size(cl);
- // The following call forces module initialization
- ThreadCache* heap = ThreadCache::GetCache();
- if (size <= kMaxSize) {
- size_t cl = Static::sizemap()->SizeClass(size);
- size = Static::sizemap()->class_to_size(cl);
+ if ((FLAGS_tcmalloc_sample_parameter > 0) && heap->SampleAllocation(size)) {
+ return DoSampledAllocation(size);
+ } else {
+ // The common case, and also the simplest. This just pops the
+ // size-appropriate freelist, after replenishing it if it's empty.
+ return CheckedMallocResult(heap->Allocate(size, cl));
+ }
+}
- if ((FLAGS_tcmalloc_sample_parameter > 0) && heap->SampleAllocation(size)) {
- ret = DoSampledAllocation(size);
- } else {
- // The common case, and also the simplest. This just pops the
- // size-appropriate freelist, after replenishing it if it's empty.
- ret = CheckedMallocResult(heap->Allocate(size, cl));
- }
+inline void* do_malloc_no_errno(size_t size) {
+ if (ThreadCache::have_tls &&
+ LIKELY(size < ThreadCache::MinSizeForSlowPath())) {
+ return do_malloc_small(ThreadCache::GetCacheWhichMustBePresent(), size);
+ } else if (size <= kMaxSize) {
+ return do_malloc_small(ThreadCache::GetCache(), size);
} else {
- ret = do_malloc_pages(heap, size);
+ return do_malloc_pages(ThreadCache::GetCache(), size);
}
- if (ret == NULL) errno = ENOMEM;
+}
+
+inline void* do_malloc(size_t size) {
+ void* ret = do_malloc_no_errno(size);
+ if (UNLIKELY(ret == NULL)) errno = ENOMEM;
return ret;
}
@@ -1079,55 +1111,72 @@
const size_t size = n * elem_size;
if (elem_size != 0 && size / elem_size != n) return NULL;
- void* result = do_malloc_or_cpp_alloc(size);
- if (result != NULL) {
+ void* result = do_malloc_no_errno_or_cpp_alloc(size);
+ if (result == NULL) {
+ errno = ENOMEM;
+ } else {
memset(result, 0, size);
}
return result;
}
-static inline ThreadCache* GetCacheIfPresent() {
- void* const p = ThreadCache::GetCacheIfPresent();
- return reinterpret_cast<ThreadCache*>(p);
+// If ptr is NULL, do nothing. Otherwise invoke the given function.
+inline void free_null_or_invalid(void* ptr, void (*invalid_free_fn)(void*)) {
+ if (ptr != NULL) {
+ (*invalid_free_fn)(ptr);
+ }
}
-// This lets you call back to a given function pointer if ptr is invalid.
-// It is used primarily by windows code which wants a specialized callback.
-inline void do_free_with_callback(void* ptr, void (*invalid_free_fn)(void*)) {
- if (ptr == NULL) return;
- if (Static::pageheap() == NULL) {
+// Helper for do_free_with_callback(), below. Inputs:
+// ptr is object to be freed
+// invalid_free_fn is a function that gets invoked on certain "bad frees"
+// heap is the ThreadCache for this thread, or NULL if it isn't known
+// heap_must_be_valid is whether heap is known to be non-NULL
+//
+// This function may only be used after Static::IsInited() is true.
+//
+// We can usually detect the case where ptr is not pointing to a page that
+// tcmalloc is using, and in those cases we invoke invalid_free_fn.
+//
+// To maximize speed in the common case, we usually get here with
+// heap_must_be_valid being a manifest constant equal to true.
+inline void do_free_helper(void* ptr,
+ void (*invalid_free_fn)(void*),
+ ThreadCache* heap,
+ bool heap_must_be_valid) {
+ ASSERT((Static::IsInited() && heap != NULL) || !heap_must_be_valid);
+ if (!heap_must_be_valid && !Static::IsInited()) {
// We called free() before malloc(). This can occur if the
// (system) malloc() is called before tcmalloc is loaded, and then
// free() is called after tcmalloc is loaded (and tc_free has
// replaced free), but before the global constructor has run that
// sets up the tcmalloc data structures.
- (*invalid_free_fn)(ptr); // Decide how to handle the bad free request
+ free_null_or_invalid(ptr, invalid_free_fn);
return;
}
- const PageID p = reinterpret_cast<uintptr_t>(ptr) >> kPageShift;
Span* span = NULL;
+ const PageID p = reinterpret_cast<uintptr_t>(ptr) >> kPageShift;
size_t cl = Static::pageheap()->GetSizeClassIfCached(p);
-
- if (cl == 0) {
+ if (UNLIKELY(cl == 0)) {
span = Static::pageheap()->GetDescriptor(p);
- if (!span) {
- // span can be NULL because the pointer passed in is invalid
+ if (UNLIKELY(!span)) {
+ // span can be NULL because the pointer passed in is NULL or invalid
// (not something returned by malloc or friends), or because the
// pointer was allocated with some other allocator besides
// tcmalloc. The latter can happen if tcmalloc is linked in via
// a dynamic library, but is not listed last on the link line.
// In that case, libraries after it on the link line will
// allocate with libc malloc, but free with tcmalloc's free.
- (*invalid_free_fn)(ptr); // Decide how to handle the bad free request
+ free_null_or_invalid(ptr, invalid_free_fn);
return;
}
cl = span->sizeclass;
Static::pageheap()->CacheSizeClass(p, cl);
}
- if (cl != 0) {
+ ASSERT(ptr != NULL);
+ if (LIKELY(cl != 0)) {
ASSERT(!Static::pageheap()->GetDescriptor(p)->sample);
- ThreadCache* heap = GetCacheIfPresent();
- if (heap != NULL) {
+ if (heap_must_be_valid || heap != NULL) {
heap->Deallocate(ptr, cl);
} else {
// Delete directly into central cache
@@ -1148,6 +1197,23 @@
}
}
+// Helper for the object deletion (free, delete, etc.). Inputs:
+// ptr is object to be freed
+// invalid_free_fn is a function that gets invoked on certain "bad frees"
+//
+// We can usually detect the case where ptr is not pointing to a page that
+// tcmalloc is using, and in those cases we invoke invalid_free_fn.
+inline void do_free_with_callback(void* ptr, void (*invalid_free_fn)(void*)) {
+ ThreadCache* heap = NULL;
+ if (LIKELY(ThreadCache::IsFastPathAllowed())) {
+ heap = ThreadCache::GetCacheWhichMustBePresent();
+ do_free_helper(ptr, invalid_free_fn, heap, true);
+ } else {
+ heap = ThreadCache::GetCacheIfPresent();
+ do_free_helper(ptr, invalid_free_fn, heap, false);
+ }
+}
+
// The default "do_free" that uses the default callback.
inline void do_free(void* ptr) {
return do_free_with_callback(ptr, &InvalidFree);
@@ -1165,7 +1231,7 @@
return Static::sizemap()->ByteSizeForClass(cl);
} else {
const Span *span = Static::pageheap()->GetDescriptor(p);
- if (span == NULL) { // means we do not own this memory
+ if (UNLIKELY(span == NULL)) { // means we do not own this memory
return (*invalid_getsize_fn)(ptr);
} else if (span->sizeclass != 0) {
Static::pageheap()->CacheSizeClass(p, span->sizeclass);
@@ -1191,20 +1257,20 @@
// . If we need to grow, grow to max(new_size, old_size * 1.X)
// . Don't shrink unless new_size < old_size * 0.Y
// X and Y trade-off time for wasted space. For now we do 1.25 and 0.5.
- const int lower_bound_to_grow = old_size + old_size / 4;
- const int upper_bound_to_shrink = old_size / 2;
+ const size_t lower_bound_to_grow = old_size + old_size / 4ul;
+ const size_t upper_bound_to_shrink = old_size / 2ul;
if ((new_size > old_size) || (new_size < upper_bound_to_shrink)) {
// Need to reallocate.
void* new_ptr = NULL;
if (new_size > old_size && new_size < lower_bound_to_grow) {
- new_ptr = do_malloc_or_cpp_alloc(lower_bound_to_grow);
+ new_ptr = do_malloc_no_errno_or_cpp_alloc(lower_bound_to_grow);
}
if (new_ptr == NULL) {
// Either new_size is not a tiny increment, or last do_malloc failed.
new_ptr = do_malloc_or_cpp_alloc(new_size);
}
- if (new_ptr == NULL) {
+ if (UNLIKELY(new_ptr == NULL)) {
return NULL;
}
MallocHook::InvokeNewHook(new_ptr, new_size);
@@ -1247,7 +1313,7 @@
return p;
}
- if (Static::pageheap() == NULL) ThreadCache::InitModule();
+ if (UNLIKELY(Static::pageheap() == NULL)) ThreadCache::InitModule();
// Allocate at least one byte to avoid boundary conditions below
if (size == 0) size = 1;
@@ -1279,13 +1345,13 @@
// TODO: We could put the rest of this page in the appropriate
// TODO: cache but it does not seem worth it.
Span* span = Static::pageheap()->New(tcmalloc::pages(size));
- return span == NULL ? NULL : SpanToMallocResult(span);
+ return UNLIKELY(span == NULL) ? NULL : SpanToMallocResult(span);
}
// Allocate extra pages and carve off an aligned portion
const Length alloc = tcmalloc::pages(size + align);
Span* span = Static::pageheap()->New(alloc);
- if (span == NULL) return NULL;
+ if (UNLIKELY(span == NULL)) return NULL;
// Skip starting portion so that we end up aligned
Length skip = 0;
@@ -1350,12 +1416,12 @@
static SpinLock set_new_handler_lock(SpinLock::LINKER_INITIALIZED);
inline void* cpp_alloc(size_t size, bool nothrow) {
- for (;;) {
- void* p = do_malloc(size);
#ifdef PREANSINEW
- return p;
+ return do_malloc(size);
#else
- if (p == NULL) { // allocation failed
+ for (;;) {
+ void* p = do_malloc_no_errno(size);
+ if (UNLIKELY(p == NULL)) { // allocation failed
// Get the current new handler. NB: this function is not
// thread-safe. We make a feeble stab at making it so here, but
// this lock only protects against tcmalloc interfering with
@@ -1373,11 +1439,11 @@
(*nh)();
continue;
}
- return 0;
+ goto fail;
#else
// If no new_handler is established, the allocation failed.
if (!nh) {
- if (nothrow) return 0;
+ if (nothrow) goto fail;
throw std::bad_alloc();
}
// Otherwise, try the new_handler. If it returns, retry the
@@ -1387,7 +1453,7 @@
(*nh)();
} catch (const std::bad_alloc&) {
if (!nothrow) throw;
- return p;
+ goto fail;
}
#endif // (defined(__GNUC__) && !defined(__EXCEPTIONS)) || (defined(_HAS_EXCEPTIONS) && !_HAS_EXCEPTIONS)
} else { // allocation success
@@ -1395,6 +1461,9 @@
}
#endif // PREANSINEW
}
+fail:
+ errno = ENOMEM;
+ return 0;
}
void* cpp_memalign(size_t align, size_t size) {
@@ -1403,7 +1472,7 @@
#ifdef PREANSINEW
return p;
#else
- if (p == NULL) { // allocation failed
+ if (UNLIKELY(p == NULL)) { // allocation failed
// Get the current new handler. NB: this function is not
// thread-safe. We make a feeble stab at making it so here, but
// this lock only protects against tcmalloc interfering with
@@ -1447,6 +1516,8 @@
// As promised, the definition of this function, declared above.
size_t TCMallocImplementation::GetAllocatedSize(const void* ptr) {
+ if (ptr == NULL)
+ return 0;
ASSERT(TCMallocImplementation::GetOwnership(ptr)
!= TCMallocImplementation::kNotOwned);
return GetSizeWithCallback(ptr, &InvalidGetAllocatedSize);
@@ -1601,7 +1672,7 @@
void* result = do_memalign_or_cpp_memalign(align, size);
MallocHook::InvokeNewHook(result, size);
- if (result == NULL) {
+ if (UNLIKELY(result == NULL)) {
return ENOMEM;
} else {
*result_ptr = result;
diff -urP gperftools-2.0/src/tests/getpc_test.cc /home/spot/gperftools/src/tests/getpc_test.cc
--- gperftools-2.0/src/tests/getpc_test.cc 2012-02-02 16:36:23.000000000 -0500
+++ /home/spot/gperftools/src/tests/getpc_test.cc 2013-03-01 14:25:38.480366833 -0500
@@ -106,7 +106,7 @@
// ElfW(Addr) gp; /* global pointer */
// };
// We want the code entry point.
-#if defined(__ia64) || defined(__ppc64) // NOTE: ppc64 is UNTESTED
+#if defined(__ia64) || defined(__powerpc64__) // NOTE: ppc64 is UNTESTED
expected = ((char**)expected)[0]; // this is "ip"
#endif
diff -urP gperftools-2.0/src/tests/malloc_hook_test.cc /home/spot/gperftools/src/tests/malloc_hook_test.cc
--- gperftools-2.0/src/tests/malloc_hook_test.cc 2012-02-03 14:18:23.000000000 -0500
+++ /home/spot/gperftools/src/tests/malloc_hook_test.cc 2013-03-01 14:25:38.478366833 -0500
@@ -97,11 +97,11 @@
// values as integers for testing.
typedef base::internal::HookList<MallocHook::NewHook> TestHookList;
-int TestHookList_Traverse(const TestHookList& list, int* output_array, int n) {
+int TestHookList_Traverse(const TestHookList& list, uintptr_t* output_array, int n) {
MallocHook::NewHook values_as_hooks[kHookListMaxValues];
int result = list.Traverse(values_as_hooks, min(n, kHookListMaxValues));
for (int i = 0; i < result; ++i) {
- output_array[i] = reinterpret_cast<const int&>(values_as_hooks[i]);
+ output_array[i] = reinterpret_cast<const uintptr_t>(*values_as_hooks[i]);
}
return result;
}
@@ -120,7 +120,7 @@
TEST(HookListTest, InitialValueExists) {
TestHookList list = INIT_HOOK_LIST(69);
- int values[2] = { 0, 0 };
+ uintptr_t values[2] = { 0, 0 };
EXPECT_EQ(1, TestHookList_Traverse(list, values, 2));
EXPECT_EQ(69, values[0]);
EXPECT_EQ(1, list.priv_end);
@@ -131,7 +131,7 @@
ASSERT_TRUE(TestHookList_Remove(&list, 69));
EXPECT_EQ(0, list.priv_end);
- int values[2] = { 0, 0 };
+ uintptr_t values[2] = { 0, 0 };
EXPECT_EQ(0, TestHookList_Traverse(list, values, 2));
}
@@ -140,7 +140,7 @@
ASSERT_TRUE(TestHookList_Add(&list, 42));
EXPECT_EQ(2, list.priv_end);
- int values[2] = { 0, 0 };
+ uintptr_t values[2] = { 0, 0 };
EXPECT_EQ(2, TestHookList_Traverse(list, values, 2));
EXPECT_EQ(69, values[0]);
EXPECT_EQ(42, values[1]);
@@ -153,7 +153,7 @@
ASSERT_TRUE(TestHookList_Remove(&list, 69));
EXPECT_EQ(2, list.priv_end);
- int values[2] = { 0, 0 };
+ uintptr_t values[2] = { 0, 0 };
EXPECT_EQ(1, TestHookList_Traverse(list, values, 2));
EXPECT_EQ(42, values[0]);
@@ -172,7 +172,7 @@
ASSERT_TRUE(TestHookList_Add(&list, 7));
EXPECT_EQ(2, list.priv_end);
- int values[2] = { 0, 0 };
+ uintptr_t values[2] = { 0, 0 };
EXPECT_EQ(2, TestHookList_Traverse(list, values, 2));
EXPECT_EQ(7, values[0]);
EXPECT_EQ(42, values[1]);
@@ -182,7 +182,7 @@
TestHookList list = INIT_HOOK_LIST(69);
EXPECT_FALSE(TestHookList_Add(&list, 0));
- int values[2] = { 0, 0 };
+ uintptr_t values[2] = { 0, 0 };
EXPECT_EQ(1, TestHookList_Traverse(list, values, 2));
EXPECT_EQ(69, values[0]);
EXPECT_EQ(1, list.priv_end);
@@ -196,7 +196,7 @@
EXPECT_EQ(kHookListMaxValues, num_inserts);
EXPECT_EQ(kHookListMaxValues, list.priv_end);
- int values[kHookListMaxValues + 1];
+ uintptr_t values[kHookListMaxValues + 1];
EXPECT_EQ(kHookListMaxValues, TestHookList_Traverse(list, values,
kHookListMaxValues));
EXPECT_EQ(69, values[0]);
@@ -218,7 +218,7 @@
int value = (i << shift) + thread_num;
EXPECT_TRUE(TestHookList_Add(list, value));
sched_yield(); // Ensure some more interleaving.
- int values[kHookListMaxValues + 1];
+ uintptr_t values[kHookListMaxValues + 1];
int num_values = TestHookList_Traverse(*list, values, kHookListMaxValues);
EXPECT_LT(0, num_values);
int value_index;
@@ -284,7 +284,7 @@
RunManyThreadsWithId(&MultithreadedTestThreadRunner, num_threads_remaining,
1 << 15);
- int values[kHookListMaxValues + 1];
+ uintptr_t values[kHookListMaxValues + 1];
EXPECT_EQ(0, TestHookList_Traverse(list, values, kHookListMaxValues));
EXPECT_EQ(0, list.priv_end);
}
diff -urP gperftools-2.0/src/tests/markidle_unittest.cc /home/spot/gperftools/src/tests/markidle_unittest.cc
--- gperftools-2.0/src/tests/markidle_unittest.cc 2012-02-03 14:18:23.000000000 -0500
+++ /home/spot/gperftools/src/tests/markidle_unittest.cc 2013-03-01 14:25:38.485366833 -0500
@@ -92,9 +92,9 @@
CHECK_LE(post_idle, original);
// Log after testing because logging can allocate heap memory.
- VLOG(0, "Original usage: %"PRIuS"\n", original);
- VLOG(0, "Post allocation: %"PRIuS"\n", post_allocation);
- VLOG(0, "Post idle: %"PRIuS"\n", post_idle);
+ VLOG(0, "Original usage: %" PRIuS "\n", original);
+ VLOG(0, "Post allocation: %" PRIuS "\n", post_allocation);
+ VLOG(0, "Post idle: %" PRIuS "\n", post_idle);
}
int main(int argc, char** argv) {
diff -urP gperftools-2.0/src/tests/page_heap_test.cc /home/spot/gperftools/src/tests/page_heap_test.cc
--- gperftools-2.0/src/tests/page_heap_test.cc 2012-02-02 16:36:23.000000000 -0500
+++ /home/spot/gperftools/src/tests/page_heap_test.cc 2013-03-01 14:25:38.483366833 -0500
@@ -3,17 +3,29 @@
#include "config_for_unittests.h"
#include "page_heap.h"
+#include "system-alloc.h"
#include <stdio.h>
#include "base/logging.h"
#include "common.h"
+DECLARE_int64(tcmalloc_heap_limit_mb);
+
namespace {
+static bool HaveSystemRelease =
+ TCMalloc_SystemRelease(TCMalloc_SystemAlloc(kPageSize, NULL, 0), kPageSize);
+
static void CheckStats(const tcmalloc::PageHeap* ph,
uint64_t system_pages,
uint64_t free_pages,
uint64_t unmapped_pages) {
tcmalloc::PageHeap::Stats stats = ph->stats();
+
+ if (!HaveSystemRelease) {
+ free_pages += unmapped_pages;
+ unmapped_pages = 0;
+ }
+
EXPECT_EQ(system_pages, stats.system_bytes >> kPageShift);
EXPECT_EQ(free_pages, stats.free_bytes >> kPageShift);
EXPECT_EQ(unmapped_pages, stats.unmapped_bytes >> kPageShift);
@@ -36,7 +48,7 @@
CheckStats(ph, 256, 128, 0);
// Unmap deleted span 's2'
- EXPECT_EQ(s2_len, ph->ReleaseAtLeastNPages(1));
+ ph->ReleaseAtLeastNPages(1);
CheckStats(ph, 256, 0, 128);
// Delete span 's1'
@@ -46,10 +58,99 @@
delete ph;
}
+static void TestPageHeap_Limit() {
+ tcmalloc::PageHeap* ph = new tcmalloc::PageHeap();
+
+ CHECK_EQ(kMaxPages, 1 << (20 - kPageShift));
+
+ // We do not know much is taken from the system for other purposes,
+ // so we detect the proper limit:
+ {
+ FLAGS_tcmalloc_heap_limit_mb = 1;
+ tcmalloc::Span* s = NULL;
+ while((s = ph->New(kMaxPages)) == NULL) {
+ FLAGS_tcmalloc_heap_limit_mb++;
+ }
+ FLAGS_tcmalloc_heap_limit_mb += 9;
+ ph->Delete(s);
+ // We are [10, 11) mb from the limit now.
+ }
+
+ // Test AllocLarge and GrowHeap first:
+ {
+ tcmalloc::Span * spans[10];
+ for (int i=0; i<10; ++i) {
+ spans[i] = ph->New(kMaxPages);
+ EXPECT_NE(spans[i], NULL);
+ }
+ EXPECT_EQ(ph->New(kMaxPages), NULL);
+
+ for (int i=0; i<10; i += 2) {
+ ph->Delete(spans[i]);
+ }
+
+ tcmalloc::Span *defragmented = ph->New(5 * kMaxPages);
+
+ if (HaveSystemRelease) {
+ // EnsureLimit should release deleted normal spans
+ EXPECT_NE(defragmented, NULL);
+ EXPECT_TRUE(ph->CheckExpensive());
+ ph->Delete(defragmented);
+ }
+ else
+ {
+ EXPECT_EQ(defragmented, NULL);
+ EXPECT_TRUE(ph->CheckExpensive());
+ }
+
+ for (int i=1; i<10; i += 2) {
+ ph->Delete(spans[i]);
+ }
+ }
+
+ // Once again, testing small lists this time (twice smaller spans):
+ {
+ tcmalloc::Span * spans[20];
+ for (int i=0; i<20; ++i) {
+ spans[i] = ph->New(kMaxPages >> 1);
+ EXPECT_NE(spans[i], NULL);
+ }
+ // one more half size allocation may be possible:
+ tcmalloc::Span * lastHalf = ph->New(kMaxPages >> 1);
+ EXPECT_EQ(ph->New(kMaxPages >> 1), NULL);
+
+ for (int i=0; i<20; i += 2) {
+ ph->Delete(spans[i]);
+ }
+
+ for(Length len = kMaxPages >> 2; len < 5 * kMaxPages; len = len << 1)
+ {
+ if(len <= kMaxPages >> 1 || HaveSystemRelease) {
+ tcmalloc::Span *s = ph->New(len);
+ EXPECT_NE(s, NULL);
+ ph->Delete(s);
+ }
+ }
+
+ EXPECT_TRUE(ph->CheckExpensive());
+
+ for (int i=1; i<20; i += 2) {
+ ph->Delete(spans[i]);
+ }
+
+ if (lastHalf != NULL) {
+ ph->Delete(lastHalf);
+ }
+ }
+
+ delete ph;
+}
+
} // namespace
int main(int argc, char **argv) {
TestPageHeap_Stats();
+ TestPageHeap_Limit();
printf("PASS\n");
return 0;
}
diff -urP gperftools-2.0/src/tests/profiler_unittest.sh /home/spot/gperftools/src/tests/profiler_unittest.sh
--- gperftools-2.0/src/tests/profiler_unittest.sh 2012-02-02 16:36:23.000000000 -0500
+++ /home/spot/gperftools/src/tests/profiler_unittest.sh 2013-03-01 14:25:38.476366833 -0500
@@ -85,6 +85,14 @@
# It's meaningful to the profiler, so make sure we know its state
unset CPUPROFILE
+# Some output/logging in the profiler can cause issues when running the unit
+# tests. For example, logging a warning when the profiler is detected as being
+# present but no CPUPROFILE is specified in the environment. Especially when
+# we are checking for a silent run or specific timing constraints are being
+# checked. So set the env variable signifying that we are running in a unit
+# test environment.
+PERFTOOLS_UNITTEST=1
+
rm -rf "$TMPDIR"
mkdir "$TMPDIR" || exit 2
@@ -95,11 +103,11 @@
}
# Takes two filenames representing profiles, with their executable scripts,
-# and a multiplier, and verifies that the 'contentful' functions in
-# each profile take the same time (possibly scaled by the given
-# multiplier). It used to be "same" meant within 50%, after adding an
-# noise-reducing X units to each value. But even that would often
-# spuriously fail, so now it's "both non-zero". We're pretty forgiving.
+# and a multiplier, and verifies that the 'contentful' functions in each
+# profile take the same time (possibly scaled by the given multiplier). It
+# used to be "same" meant within 50%, after adding an noise-reducing X units
+# to each value. But even that would often spuriously fail, so now it's
+# "both non-zero". We're pretty forgiving.
VerifySimilar() {
prof1="$TMPDIR/$1"
exec1="$2"
diff -urP gperftools-2.0/src/tests/tcmalloc_unittest.cc /home/spot/gperftools/src/tests/tcmalloc_unittest.cc
--- gperftools-2.0/src/tests/tcmalloc_unittest.cc 2012-02-03 14:18:23.000000000 -0500
+++ /home/spot/gperftools/src/tests/tcmalloc_unittest.cc 2013-03-01 14:25:38.476366833 -0500
@@ -92,6 +92,7 @@
#include "gperftools/malloc_extension.h"
#include "gperftools/tcmalloc.h"
#include "thread_cache.h"
+#include "system-alloc.h"
#include "tests/testutil.h"
// Windows doesn't define pvalloc and a few other obsolete unix
@@ -579,7 +580,7 @@
static void TestCalloc(size_t n, size_t s, bool ok) {
char* p = reinterpret_cast<char*>(calloc(n, s));
if (FLAGS_verbose)
- fprintf(LOGSTREAM, "calloc(%"PRIxS", %"PRIxS"): %p\n", n, s, p);
+ fprintf(LOGSTREAM, "calloc(%" PRIxS ", %" PRIxS "): %p\n", n, s, p);
if (!ok) {
CHECK(p == NULL); // calloc(n, s) should not succeed
} else {
@@ -759,9 +760,10 @@
CHECK((p % sizeof(void*)) == 0);
CHECK((p % sizeof(double)) == 0);
- // Must have 16-byte alignment for large enough objects
- if (size >= 16) {
- CHECK((p % 16) == 0);
+ // Must have 16-byte (or 8-byte in case of -DTCMALLOC_ALIGN_8BYTES)
+ // alignment for large enough objects
+ if (size >= kMinAlign) {
+ CHECK((p % kMinAlign) == 0);
}
}
for (int i = 0; i < kNum; i++) {
@@ -834,20 +836,26 @@
}
+static bool HaveSystemRelease =
+ TCMalloc_SystemRelease(TCMalloc_SystemAlloc(kPageSize, NULL, 0), kPageSize);
+
static void TestRanges() {
static const int MB = 1048576;
void* a = malloc(MB);
void* b = malloc(MB);
+ base::MallocRange::Type releasedType =
+ HaveSystemRelease ? base::MallocRange::UNMAPPED : base::MallocRange::FREE;
+
CheckRangeCallback(a, base::MallocRange::INUSE, MB);
CheckRangeCallback(b, base::MallocRange::INUSE, MB);
free(a);
CheckRangeCallback(a, base::MallocRange::FREE, MB);
CheckRangeCallback(b, base::MallocRange::INUSE, MB);
MallocExtension::instance()->ReleaseFreeMemory();
- CheckRangeCallback(a, base::MallocRange::UNMAPPED, MB);
+ CheckRangeCallback(a, releasedType, MB);
CheckRangeCallback(b, base::MallocRange::INUSE, MB);
free(b);
- CheckRangeCallback(a, base::MallocRange::UNMAPPED, MB);
+ CheckRangeCallback(a, releasedType, MB);
CheckRangeCallback(b, base::MallocRange::FREE, MB);
}
@@ -865,6 +873,9 @@
// messes up all the equality tests here. I just disable the
// teset in this mode. TODO(csilvers): get it to work for debugalloc?
#ifndef DEBUGALLOCATION
+
+ if(!HaveSystemRelease) return;
+
const double old_tcmalloc_release_rate = FLAGS_tcmalloc_release_rate;
FLAGS_tcmalloc_release_rate = 0;
diff -urP gperftools-2.0/src/thread_cache.cc /home/spot/gperftools/src/thread_cache.cc
--- gperftools-2.0/src/thread_cache.cc 2012-02-02 16:36:23.000000000 -0500
+++ /home/spot/gperftools/src/thread_cache.cc 2013-03-01 14:25:38.720366824 -0500
@@ -63,11 +63,9 @@
int ThreadCache::thread_heap_count_ = 0;
ThreadCache* ThreadCache::next_memory_steal_ = NULL;
#ifdef HAVE_TLS
-__thread ThreadCache* ThreadCache::threadlocal_heap_
-# ifdef HAVE___ATTRIBUTE__
- __attribute__ ((tls_model ("initial-exec")))
-# endif
- ;
+__thread ThreadCache::ThreadLocalData ThreadCache::threadlocal_data_
+ ATTR_INITIAL_EXEC
+ = {0, 0};
#endif
bool ThreadCache::tsd_inited_ = false;
pthread_key_t ThreadCache::heap_key_;
@@ -379,7 +377,8 @@
perftools_pthread_setspecific(heap_key_, heap);
#ifdef HAVE_TLS
// Also keep a copy in __thread for faster retrieval
- threadlocal_heap_ = heap;
+ threadlocal_data_.heap = heap;
+ SetMinSizeForSlowPath(kMaxSize + 1);
#endif
heap->in_setspecific_ = false;
}
@@ -414,7 +413,8 @@
perftools_pthread_setspecific(heap_key_, NULL);
#ifdef HAVE_TLS
// Also update the copy in __thread
- threadlocal_heap_ = NULL;
+ threadlocal_data_.heap = NULL;
+ SetMinSizeForSlowPath(0);
#endif
heap->in_setspecific_ = false;
if (GetThreadHeap() == heap) {
@@ -434,7 +434,8 @@
if (ptr == NULL) return;
#ifdef HAVE_TLS
// Prevent fast path of GetThreadHeap() from returning heap.
- threadlocal_heap_ = NULL;
+ threadlocal_data_.heap = NULL;
+ SetMinSizeForSlowPath(0);
#endif
DeleteCache(reinterpret_cast<ThreadCache*>(ptr));
}
diff -urP gperftools-2.0/src/thread_cache.h /home/spot/gperftools/src/thread_cache.h
--- gperftools-2.0/src/thread_cache.h 2012-02-02 16:36:23.000000000 -0500
+++ /home/spot/gperftools/src/thread_cache.h 2013-03-01 14:25:37.965366851 -0500
@@ -75,6 +75,12 @@
class ThreadCache {
public:
+#ifdef HAVE_TLS
+ enum { have_tls = true };
+#else
+ enum { have_tls = false };
+#endif
+
// All ThreadCache objects are kept in a linked list (for stats collection)
ThreadCache* next_;
ThreadCache* prev_;
@@ -106,16 +112,21 @@
static ThreadCache* GetThreadHeap();
static ThreadCache* GetCache();
static ThreadCache* GetCacheIfPresent();
+ static ThreadCache* GetCacheWhichMustBePresent();
static ThreadCache* CreateCacheIfNecessary();
static void BecomeIdle();
+ static size_t MinSizeForSlowPath();
+ static void SetMinSizeForSlowPath(size_t size);
+
+ static bool IsFastPathAllowed() { return MinSizeForSlowPath() != 0; }
// Return the number of thread heaps in use.
static inline int HeapsInUse();
- // Writes to total_bytes the total number of bytes used by all thread heaps.
- // class_count must be an array of size kNumClasses. Writes the number of
- // items on the corresponding freelist. class_count may be NULL.
- // The storage of both parameters must be zero intialized.
+ // Adds to *total_bytes the total number of bytes used by all thread heaps.
+ // Also, if class_count is not NULL, it must be an array of size kNumClasses,
+ // and this function will increment each element of class_count by the number
+ // of items in all thread-local freelists of the corresponding size class.
// REQUIRES: Static::pageheap_lock is held.
static void GetThreadStats(uint64_t* total_bytes, uint64_t* class_count);
@@ -251,12 +262,24 @@
// Since we don't really use dlopen in google code -- and using dlopen
// on a malloc replacement is asking for trouble in any case -- that's
// a good tradeoff for us.
+#ifdef HAVE___ATTRIBUTE__
+#define ATTR_INITIAL_EXEC __attribute__ ((tls_model ("initial-exec")))
+#else
+#define ATTR_INITIAL_EXEC
+#endif
+
#ifdef HAVE_TLS
- static __thread ThreadCache* threadlocal_heap_
-# ifdef HAVE___ATTRIBUTE__
- __attribute__ ((tls_model ("initial-exec")))
-# endif
- ;
+ struct ThreadLocalData {
+ ThreadCache* heap;
+ // min_size_for_slow_path is 0 if heap is NULL or kMaxSize + 1 otherwise.
+ // The latter is the common case and allows allocation to be faster
+ // than it would be otherwise: typically a single branch will
+ // determine that the requested allocation is no more than kMaxSize
+ // and we can then proceed, knowing that global and thread-local tcmalloc
+ // state is initialized.
+ size_t min_size_for_slow_path;
+ };
+ static __thread ThreadLocalData threadlocal_data_ ATTR_INITIAL_EXEC;
#endif
// Thread-specific key. Initialization here is somewhat tricky
@@ -373,12 +396,23 @@
#ifdef HAVE_TLS
// __thread is faster, but only when the kernel supports it
if (KernelSupportsTLS())
- return threadlocal_heap_;
+ return threadlocal_data_.heap;
#endif
return reinterpret_cast<ThreadCache *>(
perftools_pthread_getspecific(heap_key_));
}
+inline ThreadCache* ThreadCache::GetCacheWhichMustBePresent() {
+#ifdef HAVE_TLS
+ ASSERT(threadlocal_data_.heap);
+ return threadlocal_data_.heap;
+#else
+ ASSERT(perftools_pthread_getspecific(heap_key_));
+ return reinterpret_cast<ThreadCache *>(
+ perftools_pthread_getspecific(heap_key_));
+#endif
+}
+
inline ThreadCache* ThreadCache::GetCache() {
ThreadCache* ptr = NULL;
if (!tsd_inited_) {
@@ -398,6 +432,20 @@
return GetThreadHeap();
}
+inline size_t ThreadCache::MinSizeForSlowPath() {
+#ifdef HAVE_TLS
+ return threadlocal_data_.min_size_for_slow_path;
+#else
+ return 0;
+#endif
+}
+
+inline void ThreadCache::SetMinSizeForSlowPath(size_t size) {
+#ifdef HAVE_TLS
+ threadlocal_data_.min_size_for_slow_path = size;
+#endif
+}
+
} // namespace tcmalloc
#endif // TCMALLOC_THREAD_CACHE_H_
diff -urP gperftools-2.0/src/windows/port.cc /home/spot/gperftools/src/windows/port.cc
--- gperftools-2.0/src/windows/port.cc 2012-02-02 16:36:23.000000000 -0500
+++ /home/spot/gperftools/src/windows/port.cc 2013-03-01 14:25:38.029366849 -0500
@@ -218,6 +218,11 @@
// -----------------------------------------------------------------------
// These functions replace system-alloc.cc
+// The current system allocator declaration (unused here)
+SysAllocator* sys_alloc = NULL;
+// Number of bytes taken from system.
+size_t TCMalloc_SystemTaken = 0;
+
// This is mostly like MmapSysAllocator::Alloc, except it does these weird
// munmap's in the middle of the page, which is forbidden in windows.
extern void* TCMalloc_SystemAlloc(size_t size, size_t *actual_size,
@@ -243,6 +248,8 @@
if (result == NULL)
return NULL;
+ TCMalloc_SystemTaken += size + extra;
+
// Adjust the return memory so it is aligned
uintptr_t ptr = reinterpret_cast<uintptr_t>(result);
size_t adjust = 0;
@@ -254,8 +261,9 @@
return reinterpret_cast<void*>(ptr);
}
-void TCMalloc_SystemRelease(void* start, size_t length) {
+bool TCMalloc_SystemRelease(void* start, size_t length) {
// TODO(csilvers): should I be calling VirtualFree here?
+ return false;
}
bool RegisterSystemAllocator(SysAllocator *allocator, int priority) {
@@ -266,9 +274,6 @@
// We don't dump stats on windows, right now
}
-// The current system allocator
-SysAllocator* sys_alloc = NULL;
-
// -----------------------------------------------------------------------
// These functions rework existing functions of the same name in the
diff -urP gperftools-2.0/src/windows/TODO /home/spot/gperftools/src/windows/TODO
--- gperftools-2.0/src/windows/TODO 1969-12-31 19:00:00.000000000 -0500
+++ /home/spot/gperftools/src/windows/TODO 2013-03-01 14:25:38.027366849 -0500
@@ -0,0 +1,86 @@
+* Get heap-profile-table.cc using DeleteMatchingFiles
+* Get heap-profile-table.cc using FillProcSelfMaps, DumpProcSelfMaps
+* Play around with ExperimentalGetStackTrace
+* Support the windows-level memory-allocation functions? See
+ /home/build/googleclient/earth/client/tools/memorytracking/client/memorytrace/src/memorytrace.cpp
+ /home/build/googleclient/total_recall/common/sitestep/*
+ http://www.internals.com/articles/apispy/apispy.htm
+ http://www.wheaty.net/APISPY32.zip
+* Verify /proc/xxx/maps:
+ http://www.geocities.com/wah_java_dotnet/procmap/index.html
+* Figure out how to edit the executable IAT so tcmalloc.dll is loaded first
+* Use QueryPerformanceCounter instead of GetTickCount() (also for sparsehash)
+
+----
+More info on windows-level memory-allocation functions:
+ C runtime malloc
+ LocalAlloc
+ GlobalAlloc
+ HeapAlloc
+ VirtualAlloc
+ mmap stuff
+
+malloc, LocalAlloc and GlobalAlloc call HeapAlloc, which calls
+VirtualAlloc when needed, which calls VirtualAllocEx (the __sbrk equiv?)
+
+siggi sez: If you want to do a generic job, you probably need to
+preserve the semantics of all of these Win32 calls:
+ Heap32First
+ Heap32ListFirst
+ Heap32ListNext
+ Heap32Next
+ HeapAlloc
+ HeapCompact
+ HeapCreate
+ HeapCreateTagsW
+ HeapDestroy
+ HeapExtend
+ HeapFree
+ HeapLock
+ HeapQueryInformation
+ HeapQueryTagW
+ HeapReAlloc
+ HeapSetInformation
+ HeapSize
+ HeapSummary
+ HeapUnlock
+ HeapUsage
+ HeapValidate
+ HeapWalk
+
+kernel32.dll export functions and nt.dll export functions:
+ http://www.shorthike.com/svn/trunk/tools_win32/dm/lib/kernel32.def
+ http://undocumented.ntinternals.net/
+
+You can edit the executable IAT to have the patching DLL be the
+first one loaded.
+
+Most complete way to intercept system calls is patch the functions
+(not the IAT).
+
+Microsoft has somee built-in routines for heap-checking:
+ http://support.microsoft.com/kb/268343
+
+----
+Itimer replacement:
+ http://msdn2.microsoft.com/en-us/library/ms712713.aspx
+
+----
+Changes I've had to make to the project file:
+
+0) When creating the project file, click on "no autogenerated files"
+
+--- For each project:
+1) Alt-F7 -> General -> [pulldown "all configurations" ] -> Output Directory -> $(SolutionDir)$(ConfigurationName)
+2) Alt-F7 -> General -> [pulldown "all configurations" ] -> Intermediate Directory -> $(ConfigurationName)
+
+--- For each .cc file:
+1) Alt-F7 -> C/C++ -> General -> [pulldown "all configurations"] -> Additional Include Directives --> src/windows + src/
+2) Alt-F7 -> C/C++ -> Code Generation -> Runtime Library -> Multi-threaded, debug/release, DLL or not
+
+--- For DLL:
+3) Alt-F7 -> Linker -> Input -> [pulldown "all configurations" ] -> Module Definition File -> src\windows\vc7and8.def
+--- For binaries depending on a DLL:
+3) Right-click on project -> Project Dependencies -> [add dll]
+--- For static binaries (not depending on a DLL)
+3) Alt-F7 -> C/C++ -> Command Line -> [pulldown "all configurations"] -> /D PERFTOOLS_DLL_DECL=