diff options
author | csilvers <csilvers@6b5cf1ce-ec42-a296-1ba9-69fdba395a50> | 2007-03-22 04:45:23 +0000 |
---|---|---|
committer | csilvers <csilvers@6b5cf1ce-ec42-a296-1ba9-69fdba395a50> | 2007-03-22 04:45:23 +0000 |
commit | 298274f8d4f474d2b16a35c8babc58817088c59e (patch) | |
tree | 80a7585df330832db9c6377e8a32e2f350c19f19 | |
parent | ee5805f1296f8546c16f90d5427efa347a5f7338 (diff) | |
download | gperftools-298274f8d4f474d2b16a35c8babc58817088c59e.tar.gz |
Mon Nov 14 17:28:59 2005 Google Inc. <opensource@google.com>
* google-perftools: version 0.5 release
* Add va_start/va_end calls around vsnprintf() (csilvers)
* Write our own __syscall_return(), since it's not defined
consistently on all 64-bit linux distros (markus)
git-svn-id: http://gperftools.googlecode.com/svn/trunk@17 6b5cf1ce-ec42-a296-1ba9-69fdba395a50
-rw-r--r-- | ChangeLog | 9 | ||||
-rwxr-xr-x | configure | 304 | ||||
-rw-r--r-- | configure.ac | 4 | ||||
-rw-r--r-- | src/base/linux_syscall_support.h | 29 | ||||
-rw-r--r-- | src/base/logging.h | 2 | ||||
-rw-r--r-- | src/config.h.in | 23 |
6 files changed, 330 insertions, 41 deletions
@@ -27,6 +27,7 @@ Tue May 31 08:14:38 2005 Google Inc. <opensource@google.com> Fri Jun 24 18:02:26 2005 Google Inc. <opensource@google.com> + * google-perftools: version 0.3 release * Add missing errno include for one of the unittests (csilvers) * Reduce tcmalloc startup memory from 5M to 256K (sanjay) * Add support for mallopt() and mallinfo (sanjay) @@ -35,6 +36,7 @@ Fri Jun 24 18:02:26 2005 Google Inc. <opensource@google.com> Wed Oct 26 15:19:16 2005 Google Inc. <opensource@google.com> + * google-perftools: version 0.4 release * Decrease fragmentation in tcmalloc (lefevere) * Support for ARM in some of the thread-specific code (markus) * Turn off heap-checker for statically-linked binaries, which @@ -52,3 +54,10 @@ Wed Oct 26 15:19:16 2005 Google Inc. <opensource@google.com> * tcmalloc now tracks those stack traces that allocate memory (sanjay) * Work around a weird setspecific problem (sanjay) * Fix tcmalloc overflow problems when an alloc is close to 2G/4G (sanjay) + +Mon Nov 14 17:28:59 2005 Google Inc. <opensource@google.com> + + * google-perftools: version 0.5 release + * Add va_start/va_end calls around vsnprintf() (csilvers) + * Write our own __syscall_return(), since it's not defined + consistently on all 64-bit linux distros (markus) @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.57 for google-perftools 0.4. +# Generated by GNU Autoconf 2.57 for google-perftools 0.5. # # Report bugs to <opensource@google.com>. # @@ -422,8 +422,8 @@ SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='google-perftools' PACKAGE_TARNAME='google-perftools' -PACKAGE_VERSION='0.4' -PACKAGE_STRING='google-perftools 0.4' +PACKAGE_VERSION='0.5' +PACKAGE_STRING='google-perftools 0.5' PACKAGE_BUGREPORT='opensource@google.com' ac_unique_file="README" @@ -953,7 +953,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures google-perftools 0.4 to adapt to many kinds of systems. +\`configure' configures google-perftools 0.5 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1019,7 +1019,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of google-perftools 0.4:";; + short | recursive ) echo "Configuration of google-perftools 0.5:";; esac cat <<\_ACEOF @@ -1125,7 +1125,7 @@ fi test -n "$ac_init_help" && exit 0 if $ac_init_version; then cat <<\_ACEOF -google-perftools configure 0.4 +google-perftools configure 0.5 generated by GNU Autoconf 2.57 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 @@ -1140,7 +1140,7 @@ cat >&5 <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by google-perftools $as_me 0.4, which was +It was created by google-perftools $as_me 0.5, which was generated by GNU Autoconf 2.57. Invocation command line was $ $0 $@ @@ -1733,7 +1733,7 @@ fi # Define the identity of the package. PACKAGE=google-perftools - VERSION=0.4 + VERSION=0.5 cat >>confdefs.h <<_ACEOF @@ -19390,6 +19390,290 @@ fi done # for stacktrace? and heapchecker_unittest +for ac_header in libunwind.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_header_compiler=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc in + yes:no ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------ ## +## Report this to bug-autoconf@gnu.org. ## +## ------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; + no:yes ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------ ## +## Report this to bug-autoconf@gnu.org. ## +## ------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=$ac_header_preproc" +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + # for stacktrace (will be needed soon) + +for ac_header in unwind.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_header_compiler=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc in + yes:no ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------ ## +## Report this to bug-autoconf@gnu.org. ## +## ------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; + no:yes ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------ ## +## Report this to bug-autoconf@gnu.org. ## +## ------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=$ac_header_preproc" +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + # for stacktrace (will be needed soon) + for ac_header in conflict-signal.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` @@ -22016,7 +22300,7 @@ _ASBOX } >&5 cat >&5 <<_CSEOF -This file was extended by google-perftools $as_me 0.4, which was +This file was extended by google-perftools $as_me 0.5, which was generated by GNU Autoconf 2.57. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -22079,7 +22363,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ -google-perftools config.status 0.4 +google-perftools config.status 0.5 configured by $0, generated by GNU Autoconf 2.57, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" diff --git a/configure.ac b/configure.ac index 7da5e86..c908272 100644 --- a/configure.ac +++ b/configure.ac @@ -5,7 +5,7 @@ # make sure we're interpreted by some minimal autoconf AC_PREREQ(2.57) -AC_INIT(google-perftools, 0.4, opensource@google.com) +AC_INIT(google-perftools, 0.5, opensource@google.com) # The argument here is just something that should be in the current directory # (for sanity checking) AC_CONFIG_SRCDIR(README) @@ -32,6 +32,8 @@ AC_CHECK_FUNCS(sbrk) # for tcmalloc to get memory AC_CHECK_FUNCS(munmap) AC_FUNC_MMAP AC_CHECK_HEADERS(execinfo.h) # for stacktrace? and heapchecker_unittest +AC_CHECK_HEADERS(libunwind.h) # for stacktrace (will be needed soon) +AC_CHECK_HEADERS(unwind.h) # for stacktrace (will be needed soon) AC_CHECK_HEADERS(conflict-signal.h) # defined on some windows platforms AC_CHECK_HEADERS(linux/ptrace.h) AC_CHECK_HEADERS(syscall.h) diff --git a/src/base/linux_syscall_support.h b/src/base/linux_syscall_support.h index 1fa081c..317a5e5 100644 --- a/src/base/linux_syscall_support.h +++ b/src/base/linux_syscall_support.h @@ -96,6 +96,14 @@ * cancellable), which means we cannot call these functions. Instead, * we have to call syscall() directly. */ + #define RETURN(type, res) \ + do { \ + if ((unsigned long)(res) >= (unsigned long)(-125)) { \ + errno = -(res); \ + res = -1; \ + } \ + return (type) (res); \ + } while (0) #if defined(__i386__) /* In PIC mode (e.g. when building shared libraries), gcc for i386 * reserves ebx. Unfortunately, most distribution ship with implementations @@ -106,14 +114,14 @@ * So, we just have to redefine all of the _syscallX() macros. */ #define BODY(type,args...) \ - long __res; \ - __asm__ __volatile__("push %%ebx\n" \ - "movl %2,%%ebx\n" \ - "int $0x80\n" \ - "pop %%ebx" \ - args \ - : "memory"); \ - __syscall_return(type,__res) + long __res; \ + __asm__ __volatile__("push %%ebx\n" \ + "movl %2,%%ebx\n" \ + "int $0x80\n" \ + "pop %%ebx" \ + args \ + : "memory"); \ + RETURN(type,__res) #undef _syscall0 #define _syscall0(type,name) \ type name(void) { \ @@ -122,7 +130,7 @@ : "=a" (__res) \ : "0" (__NR_##name) \ : "memory"); \ - __syscall_return(type,__res); \ + RETURN(type,__res); \ } #undef _syscall1 #define _syscall1(type,name,type1,arg1) \ @@ -167,7 +175,7 @@ __asm__ __volatile__ (__syscall(name) \ : "=r"(__res_r0) : args : "lr", "memory"); \ __res = __res_r0; \ - __syscall_return(type, __res) + RETURN(type, __res) #undef _syscall0 #define _syscall0(type, name) \ type name() { \ @@ -374,6 +382,7 @@ } #undef REG #undef BODY + #undef RETURN #endif diff --git a/src/base/logging.h b/src/base/logging.h index 693926b..ae00e5e 100644 --- a/src/base/logging.h +++ b/src/base/logging.h @@ -79,7 +79,9 @@ enum {INFO, WARNING, ERROR, FATAL, NUM_SEVERITIES}; inline void LogPrintf(int severity, const char* pat, ...) { va_list ap; + va_start(ap, pat); vfprintf(stderr, pat, ap); + va_end(ap); fprintf(stderr, "\n"); if ((severity) == FATAL) exit(1); diff --git a/src/config.h.in b/src/config.h.in index 4699bee..365c4f8 100644 --- a/src/config.h.in +++ b/src/config.h.in @@ -60,9 +60,6 @@ /* Define if you have POSIX threads libraries and header files. */ #undef HAVE_PTHREAD -/* Define to 1 if you have the <pwd.h> header file. */ -#undef HAVE_PWD_H - /* Define to 1 if you have the `sbrk' function. */ #undef HAVE_SBRK @@ -81,9 +78,6 @@ /* Define to 1 if `eip' is member of `struct sigcontext'. */ #undef HAVE_STRUCT_SIGCONTEXT_EIP -/* Define to 1 if `regs->nip' is member of `struct sigcontext'. */ -#undef HAVE_STRUCT_SIGCONTEXT_REGS__NIP - /* Define to 1 if `rip' is member of `struct sigcontext'. */ #undef HAVE_STRUCT_SIGCONTEXT_RIP @@ -108,9 +102,6 @@ /* Define to 1 if you have the <sys/types.h> header file. */ #undef HAVE_SYS_TYPES_H -/* Define to 1 if compiler supports __thread */ -#undef HAVE_TLS - /* Define to 1 if you have the <unistd.h> header file. */ #undef HAVE_UNISTD_H @@ -144,15 +135,9 @@ /* Define to the version of this package. */ #undef PACKAGE_VERSION -/* printf format code for printing a size_t and ssize_t */ -#undef PRIdS - -/* printf format code for printing a size_t and ssize_t */ +/* printf format code for printing a size_t */ #undef PRIuS -/* printf format code for printing a size_t and ssize_t */ -#undef PRIxS - /* Define to necessary symbol if this constant uses a non-standard name on your system. */ #undef PTHREAD_CREATE_JOINABLE @@ -166,8 +151,6 @@ /* Version number of package */ #undef VERSION -/* Define to `__inline__' or `__inline' if that's what the C compiler - calls it, or to nothing if 'inline' is not supported under any name. */ -#ifndef __cplusplus +/* Define as `__inline' if that's what the C compiler calls it, or to nothing + if it is not supported. */ #undef inline -#endif |