From 22a70ad85f0cf4c15bc278af8f1100088ee04aef94a8900a1e09b65ea0fa7ee2 Mon Sep 17 00:00:00 2001 From: craig gardner Date: Tue, 7 Feb 2012 18:33:51 +0000 Subject: [PATCH] - gperftools 2.0, released 3 Feb 2012. - Primarily renamed from google-perftools to gperftools, with ownership shifted from Google to the community. - Version 1.9.1, released 23 Dec 2011. * google-perftools: version 1.9 release * Lightweight check for double-frees (blount) * BUGFIX: Fix pprof to exit properly if run with no args (dagitses) * Suggest ASan as a way to diagnose buggy code (ppluzhnikov) * Get rid of unused CACHELINE_SIZE (csilvers) * Replace atexit() calls with global dtors; helps freebsd (csilvers) * Disable heap-checker under AddressSanitizer (kcc) * Fix bug in powerpc stacktracing (ppluzhnikov) * PERF: Use exponential backoff waiting for spinlocks (m3b) * Fix 64-bit nm on 32-bit binaries in pprof (csilvers) * Add ProfileHandlerDisallowForever (rsc) * BUGFIX: Shell escape when forking in pprof (csilvers) * No longer combine overloaded functions in pprof (csilvers) * Fix address-normalizing bug in pprof (csilvers) * More consistently call abort() instead of exit() on failure (csilvers) * Allow NoGlobalLeaks to be safely called more than once (csilvers) * PORTING/BUGFIX: Fix ARM cycleclock to use volatile asm (dougkwan) * PORTING: 64-bit atomic ops for ARMv7 (dougkwan) * PORTING: Implement stacktrace for ARM (dougkwan) * PORTING: Fix malloc_hook_mmap_linux for ARM (dougkwan) * PORTING: Update linux_syscall_support.h for ARM/etc (evannier, sanek) * PORTING: Fix freebsd to work on x86_64 (chapp...@gmail.com) * PORTING: Added additional SYS_mmap fixes for FreeBSD (chappedm) * PORTING: Allow us to compile on OS X 10.6 and run on 10.5 (raltherr) * PORTING: Check for mingw compilers that *do* define timespec OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/gperftools?expand=0&rev=1 --- .gitattributes | 23 +++ .gitignore | 1 + gperftools-2.0.tar.bz2 | 3 + gperftools-fix_docdir.patch | 13 ++ gperftools.changes | 62 ++++++ gperftools.spec | 192 ++++++++++++++++++ ...tools_fix_comment_in_malloc_hook_c_h.patch | 13 ++ gperftools_fix_multiple_install_headers.patch | 77 +++++++ ...ls_fix_unassigned_malloc_in_unittest.patch | 13 ++ gperftools_gcc46.patch | 12 ++ 10 files changed, 409 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 gperftools-2.0.tar.bz2 create mode 100644 gperftools-fix_docdir.patch create mode 100644 gperftools.changes create mode 100644 gperftools.spec create mode 100644 gperftools_fix_comment_in_malloc_hook_c_h.patch create mode 100644 gperftools_fix_multiple_install_headers.patch create mode 100644 gperftools_fix_unassigned_malloc_in_unittest.patch create mode 100644 gperftools_gcc46.patch diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/gperftools-2.0.tar.bz2 b/gperftools-2.0.tar.bz2 new file mode 100644 index 0000000..b7bfb6c --- /dev/null +++ b/gperftools-2.0.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2bd94c92cef2786f76d625244c6373688680797b5ec3b456ac483b7ca1db6a99 +size 1028165 diff --git a/gperftools-fix_docdir.patch b/gperftools-fix_docdir.patch new file mode 100644 index 0000000..5c3045d --- /dev/null +++ b/gperftools-fix_docdir.patch @@ -0,0 +1,13 @@ +Index: gperftools/Makefile.am +=================================================================== +--- gperftools.orig/Makefile.am ++++ gperftools/Makefile.am +@@ -124,7 +124,7 @@ googleinclude_HEADERS = \ + src/google/tcmalloc.h \ + src/windows/google/tcmalloc.h + +-docdir = $(prefix)/share/doc/$(PACKAGE)-$(VERSION) ++docdir = $(prefix)/share/doc/packages/$(PACKAGE) + # This is for HTML and other documentation you want to install. + # Add your documentation files (in doc/) in addition to these + # top-level boilerplate files. Also add a TODO file if you have one. diff --git a/gperftools.changes b/gperftools.changes new file mode 100644 index 0000000..0c806dc --- /dev/null +++ b/gperftools.changes @@ -0,0 +1,62 @@ +------------------------------------------------------------------- +Tue Feb 7 18:12:39 UTC 2012 - cgardner@suse.com + +- gperftools 2.0, released 3 Feb 2012. +- Primarily renamed from google-perftools to gperftools, with ownership + shifted from Google to the community. + +------------------------------------------------------------------- +Sat Dec 24 19:05:13 UTC 2011 - cgardner@suse.com + +- Version 1.9.1, released 23 Dec 2011. + * google-perftools: version 1.9 release + * Lightweight check for double-frees (blount) + * BUGFIX: Fix pprof to exit properly if run with no args (dagitses) + * Suggest ASan as a way to diagnose buggy code (ppluzhnikov) + * Get rid of unused CACHELINE_SIZE (csilvers) + * Replace atexit() calls with global dtors; helps freebsd (csilvers) + * Disable heap-checker under AddressSanitizer (kcc) + * Fix bug in powerpc stacktracing (ppluzhnikov) + * PERF: Use exponential backoff waiting for spinlocks (m3b) + * Fix 64-bit nm on 32-bit binaries in pprof (csilvers) + * Add ProfileHandlerDisallowForever (rsc) + * BUGFIX: Shell escape when forking in pprof (csilvers) + * No longer combine overloaded functions in pprof (csilvers) + * Fix address-normalizing bug in pprof (csilvers) + * More consistently call abort() instead of exit() on failure (csilvers) + * Allow NoGlobalLeaks to be safely called more than once (csilvers) + * PORTING/BUGFIX: Fix ARM cycleclock to use volatile asm (dougkwan) + * PORTING: 64-bit atomic ops for ARMv7 (dougkwan) + * PORTING: Implement stacktrace for ARM (dougkwan) + * PORTING: Fix malloc_hook_mmap_linux for ARM (dougkwan) + * PORTING: Update linux_syscall_support.h for ARM/etc (evannier, sanek) + * PORTING: Fix freebsd to work on x86_64 (chapp...@gmail.com) + * PORTING: Added additional SYS_mmap fixes for FreeBSD (chappedm) + * PORTING: Allow us to compile on OS X 10.6 and run on 10.5 (raltherr) + * PORTING: Check for mingw compilers that *do* define timespec + * PORTING: Add "support" for MIPS cycletimer + * PORTING: Fix fallback cycle-timer to work with Now (dougkwan) + * PERF: Move stack trace collecting out of the mutex (taylorc) + * PERF: Get the deallocation stack trace outside the mutex (sean) + * Make PageHeap dynamically allocated for leak checks (maxim) + * BUGFIX: Fix probing of nm -f behavior in pprof (dpeng) + * BUGFIX: Fix a race with the CentralFreeList lock before main (sanjay) + * Support /pprof/censusprofile url arguments (rajatjain) + * Change IgnoreObject to return its argument (nlewycky) + * Update malloc-hook files to support more CPUs + * BUGFIX: write our own strstr to avoid libc problems (csilvers) + * Use simple callgrind compression facility in pprof + * Print an error message when we can't run pprof to symbolize (csilvers) + * Die in configure when g++ is't installed (csilvers) + * DOC: Beef up the documentation a bit about using libunwind (csilvers) + +------------------------------------------------------------------- +Sat Oct 15 04:47:04 UTC 2011 - coolo@suse.com + +- add libtool as buildrequire to make the spec file more reliable + +------------------------------------------------------------------- +Sun Jul 17 21:59:38 UTC 2011 - cgardner@suse.com + +- Google perftools 1.8, released 15 July 2011. + diff --git a/gperftools.spec b/gperftools.spec new file mode 100644 index 0000000..d7956b4 --- /dev/null +++ b/gperftools.spec @@ -0,0 +1,192 @@ +# +# spec file for package gperftools +# +# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# + +# needsrootforbuild + + +Name: gperftools +Version: 2.0 +Release: 0 +Group: System/Libraries +License: BSD 3-clause (or similar) +Url: http://code.google.com/p/gperftools/ +Source0: %{name}-%{version}.tar.bz2 +Patch4: %{name}-fix_docdir.patch +Patch11: %{name}_fix_multiple_install_headers.patch +Patch12: %{name}_fix_unassigned_malloc_in_unittest.patch +Patch14: %{name}_gcc46.patch +BuildRequires: gcc-c++ pkg-config autoconf automake libtool +# Can't use libunwind. See bnc#393927 and bnc#395623 +%ifarch x86_64 ia64 ppc ppc64 s390 s390x +%define no_libunwind_on_64 "-DNO_TCMALLOC_SAMPLES" +%define no_libunwind_on_64_config "--enable-frame-pointers" +%else +%define no_libunwind_on_64 "" +%define no_libunwind_on_64_config "" +%endif +BuildRoot: %{_tmppath}/%{name}-%{version}-build +Summary: Performance Tools for C++ +Provides: google-perftools +Obsoletes: google-perftools + +%description +The gperftools packages contains some utilities to improve and analyze the +performance of C++ programs. This includes an optimized thread-caching +malloc() and cpu and heap profiling utilities. + + + +%package devel +License: BSD 3-clause (or similar) +Group: System/Libraries +Summary: Performance tools for C++ +Requires: libstdc++-devel, gperftools = %{version} +Provides: google-perftools-devel +Obsoletes: google-perftools-devel + +%description devel +The gperftools-devel package contains static and debug libraries and header +files for developing applications that use the gperftools package. + + + +%prep +%setup -q +%patch4 -p1 +%patch11 -p1 +%patch12 -p1 +%patch14 -p1 + +%build +autoreconf -fi +export CXXFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing %no_libunwind_on_64" \ +export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing %no_libunwind_on_64" \ +%configure --disable-static --with-gnu-ld --with-pic %no_libunwind_on_64_config +%{__make} %{?jobs:-j%jobs} + +%install +make DESTDIR=$RPM_BUILD_ROOT install +%{__rm} -f %{buildroot}%{_libdir}/*.la + +%clean +rm -rf %{buildroot} + +%post -p /sbin/ldconfig + +%postun -p /sbin/ldconfig + +%files +%defattr(-,root,root) +/usr/bin/pprof +%_libdir/libprofiler.so.0* +# %_libdir/libstacktrace.so.0* # libstacktrace.so got removed in 0.96 +%_libdir/libtcmalloc.so.4* +%_libdir/libtcmalloc_debug.so.4* +%_libdir/libtcmalloc_minimal.so.4* +%_libdir/libtcmalloc_minimal_debug.so.4* +%_libdir/libtcmalloc_and_profiler.so.4* +%_mandir/man1/pprof.1.gz +%dir %attr(775,root,root) /usr/share/doc/packages/%{name} +/usr/share/doc/packages/%{name}/AUTHORS +/usr/share/doc/packages/%{name}/COPYING +/usr/share/doc/packages/%{name}/ChangeLog +/usr/share/doc/packages/%{name}/INSTALL +/usr/share/doc/packages/%{name}/NEWS +/usr/share/doc/packages/%{name}/README +/usr/share/doc/packages/%{name}/TODO +/usr/share/doc/packages/%{name}/README_windows.txt +/usr/share/doc/packages/%{name}/cpuprofile.html +/usr/share/doc/packages/%{name}/cpuprofile-fileformat.html +/usr/share/doc/packages/%{name}/designstyle.css +/usr/share/doc/packages/%{name}/heapprofile.html +/usr/share/doc/packages/%{name}/pprof_remote_servers.html +/usr/share/doc/packages/%{name}/heap-example1.png +/usr/share/doc/packages/%{name}/heap_checker.html +/usr/share/doc/packages/%{name}/index.html +/usr/share/doc/packages/%{name}/overview.dot +/usr/share/doc/packages/%{name}/overview.gif +/usr/share/doc/packages/%{name}/pageheap.dot +/usr/share/doc/packages/%{name}/pageheap.gif +/usr/share/doc/packages/%{name}/pprof-test-big.gif +/usr/share/doc/packages/%{name}/pprof-test.gif +/usr/share/doc/packages/%{name}/pprof-vsnprintf-big.gif +/usr/share/doc/packages/%{name}/pprof-vsnprintf.gif +/usr/share/doc/packages/%{name}/spanmap.dot +/usr/share/doc/packages/%{name}/spanmap.gif +/usr/share/doc/packages/%{name}/t-test1.times.txt +/usr/share/doc/packages/%{name}/tcmalloc-opspercpusec.vs.threads.1024.bytes.png +/usr/share/doc/packages/%{name}/tcmalloc-opspercpusec.vs.threads.128.bytes.png +/usr/share/doc/packages/%{name}/tcmalloc-opspercpusec.vs.threads.131072.bytes.png +/usr/share/doc/packages/%{name}/tcmalloc-opspercpusec.vs.threads.16384.bytes.png +/usr/share/doc/packages/%{name}/tcmalloc-opspercpusec.vs.threads.2048.bytes.png +/usr/share/doc/packages/%{name}/tcmalloc-opspercpusec.vs.threads.256.bytes.png +/usr/share/doc/packages/%{name}/tcmalloc-opspercpusec.vs.threads.32768.bytes.png +/usr/share/doc/packages/%{name}/tcmalloc-opspercpusec.vs.threads.4096.bytes.png +/usr/share/doc/packages/%{name}/tcmalloc-opspercpusec.vs.threads.512.bytes.png +/usr/share/doc/packages/%{name}/tcmalloc-opspercpusec.vs.threads.64.bytes.png +/usr/share/doc/packages/%{name}/tcmalloc-opspercpusec.vs.threads.65536.bytes.png +/usr/share/doc/packages/%{name}/tcmalloc-opspercpusec.vs.threads.8192.bytes.png +/usr/share/doc/packages/%{name}/tcmalloc-opspersec.vs.size.1.threads.png +/usr/share/doc/packages/%{name}/tcmalloc-opspersec.vs.size.12.threads.png +/usr/share/doc/packages/%{name}/tcmalloc-opspersec.vs.size.16.threads.png +/usr/share/doc/packages/%{name}/tcmalloc-opspersec.vs.size.2.threads.png +/usr/share/doc/packages/%{name}/tcmalloc-opspersec.vs.size.20.threads.png +/usr/share/doc/packages/%{name}/tcmalloc-opspersec.vs.size.3.threads.png +/usr/share/doc/packages/%{name}/tcmalloc-opspersec.vs.size.4.threads.png +/usr/share/doc/packages/%{name}/tcmalloc-opspersec.vs.size.5.threads.png +/usr/share/doc/packages/%{name}/tcmalloc-opspersec.vs.size.8.threads.png +/usr/share/doc/packages/%{name}/tcmalloc.html +/usr/share/doc/packages/%{name}/threadheap.dot +/usr/share/doc/packages/%{name}/threadheap.gif + +%files devel +%defattr(-,root,root) +%dir %attr(775,root,root) /usr/include/google +/usr/include/google/heap-checker.h +/usr/include/google/heap-profiler.h +/usr/include/google/malloc_extension.h +/usr/include/google/malloc_extension_c.h +/usr/include/google/malloc_hook.h +/usr/include/google/malloc_hook_c.h +/usr/include/google/profiler.h +/usr/include/google/stacktrace.h +/usr/include/google/tcmalloc.h +%dir %attr(775,root,root) /usr/include/gperftools +/usr/include/gperftools/heap-checker.h +/usr/include/gperftools/heap-profiler.h +/usr/include/gperftools/malloc_extension.h +/usr/include/gperftools/malloc_extension_c.h +/usr/include/gperftools/malloc_hook.h +/usr/include/gperftools/malloc_hook_c.h +/usr/include/gperftools/profiler.h +/usr/include/gperftools/stacktrace.h +/usr/include/gperftools/tcmalloc.h +%_libdir/libprofiler.so +# %_libdir/libstacktrace.*a # libstacktrace.so got removed in 0.96 +# %_libdir/libstacktrace.so # libstacktrace.so got removed in 0.96 +%_libdir/libtcmalloc.so +%_libdir/libtcmalloc_debug.so +%_libdir/libtcmalloc_minimal.so +%_libdir/libtcmalloc_minimal_debug.so +%_libdir/libtcmalloc_and_profiler.so +%_libdir/pkgconfig/libprofiler.pc +%_libdir/pkgconfig/libtcmalloc.pc +%_libdir/pkgconfig/libtcmalloc_debug.pc +%_libdir/pkgconfig/libtcmalloc_minimal.pc +%_libdir/pkgconfig/libtcmalloc_minimal_debug.pc + +%changelog diff --git a/gperftools_fix_comment_in_malloc_hook_c_h.patch b/gperftools_fix_comment_in_malloc_hook_c_h.patch new file mode 100644 index 0000000..c246934 --- /dev/null +++ b/gperftools_fix_comment_in_malloc_hook_c_h.patch @@ -0,0 +1,13 @@ +Index: google-perftools-1.7/src/google/malloc_hook_c.h +=================================================================== +--- google-perftools-1.7.orig/src/google/malloc_hook_c.h ++++ google-perftools-1.7/src/google/malloc_hook_c.h +@@ -40,7 +40,7 @@ + #include + #include + +-// Annoying stuff for windows -- makes sure clients can import these functions ++/* Annoying stuff for windows -- makes sure clients can import these functions */ + #ifndef PERFTOOLS_DLL_DECL + # ifdef _WIN32 + # define PERFTOOLS_DLL_DECL __declspec(dllimport) diff --git a/gperftools_fix_multiple_install_headers.patch b/gperftools_fix_multiple_install_headers.patch new file mode 100644 index 0000000..b8474db --- /dev/null +++ b/gperftools_fix_multiple_install_headers.patch @@ -0,0 +1,77 @@ +Index: gperftools-2.0/Makefile.am +=================================================================== +--- gperftools-2.0.orig/Makefile.am ++++ gperftools-2.0/Makefile.am +@@ -121,8 +121,7 @@ googleinclude_HEADERS = \ + 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/packages/$(PACKAGE) + # This is for HTML and other documentation you want to install. +@@ -296,8 +295,6 @@ TESTS += low_level_alloc_unittest + WINDOWS_PROJECTS += vsprojects/low_level_alloc_unittest/low_level_alloc_unittest.vcproj + LOW_LEVEL_ALLOC_UNITTEST_INCLUDES = src/base/low_level_alloc.h \ + src/base/basictypes.h \ +- src/gperftools/malloc_hook.h \ +- src/gperftools/malloc_hook_c.h \ + src/malloc_hook-inl.h \ + src/malloc_hook_mmap_linux.h \ + src/malloc_hook_mmap_freebsd.h \ +@@ -432,10 +429,9 @@ S_TCMALLOC_MINIMAL_INCLUDES = src/common + 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) +-perftoolsinclude_HEADERS += $(SG_TCMALLOC_MINIMAL_INCLUDES) ++# perftoolsinclude_HEADERS += $(SG_TCMALLOC_MINIMAL_INCLUDES) + + ### Making the library + +@@ -627,9 +623,7 @@ TESTS += malloc_extension_test + WINDOWS_PROJECTS += vsprojects/malloc_extension_test/malloc_extension_test.vcproj + malloc_extension_test_SOURCES = 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 ++ src/base/logging.h + malloc_extension_test_CXXFLAGS = $(PTHREAD_CFLAGS) $(AM_CXXFLAGS) + malloc_extension_test_LDFLAGS = $(PTHREAD_CFLAGS) $(TCMALLOC_FLAGS) + malloc_extension_test_LDADD = $(LIBTCMALLOC_MINIMAL) $(PTHREAD_LIBS) +@@ -896,8 +890,7 @@ LIBS_TO_WEAKEN += libtcmalloc.la + ### Unittests + + TESTS += tcmalloc_unittest +-TCMALLOC_UNITTEST_INCLUDES = src/config_for_unittests.h \ +- src/gperftools/malloc_extension.h ++TCMALLOC_UNITTEST_INCLUDES = src/config_for_unittests.h + tcmalloc_unittest_SOURCES = src/tests/tcmalloc_unittest.cc \ + src/tcmalloc.h \ + src/tests/testutil.h src/tests/testutil.cc \ +@@ -988,8 +981,7 @@ sampling_test.sh$(EXEEXT): $(top_srcdir) + # The -g is so pprof can get symbol information. + noinst_PROGRAMS += sampling_test + SAMPLING_TEST_INCLUDES = src/config_for_unittests.h \ +- src/base/logging.h \ +- src/gperftools/malloc_extension.h ++ src/base/logging.h + sampling_test_SOURCES = src/tests/sampling_test.cc \ + $(SAMPLING_TEST_INCLUDES) + sampling_test_CXXFLAGS = -g $(PTHREAD_CFLAGS) $(AM_CXXFLAGS) +@@ -1186,8 +1178,7 @@ S_CPU_PROFILER_INCLUDES = src/profiledat + src/base/sysinfo.h \ + $(SPINLOCK_INCLUDES) \ + $(LOGGING_INCLUDES) +-SG_CPU_PROFILER_INCLUDES = src/gperftools/profiler.h \ +- src/gperftools/stacktrace.h ++SG_CPU_PROFILER_INCLUDES = src/gperftools/profiler.h + CPU_PROFILER_INCLUDES = $(S_CPU_PROFILER_INCLUDES) $(SG_CPU_PROFILER_INCLUDES) + perftoolsinclude_HEADERS += $(SG_CPU_PROFILER_INCLUDES) + diff --git a/gperftools_fix_unassigned_malloc_in_unittest.patch b/gperftools_fix_unassigned_malloc_in_unittest.patch new file mode 100644 index 0000000..adb72a4 --- /dev/null +++ b/gperftools_fix_unassigned_malloc_in_unittest.patch @@ -0,0 +1,13 @@ +Index: google-perftools-1.8/src/tests/heap-checker_unittest.cc +=================================================================== +--- google-perftools-1.8.orig/src/tests/heap-checker_unittest.cc ++++ google-perftools-1.8/src/tests/heap-checker_unittest.cc +@@ -681,7 +681,7 @@ static void ScopedDisabledLeaks() { + HeapLeakChecker::Disabler disabler; + AllocHidden(3 * sizeof(int)); + TransLeaks(); +- (void)malloc(10); // Direct leak ++ void* p = malloc(10); // Direct leak + } + + // have different disabled leaks diff --git a/gperftools_gcc46.patch b/gperftools_gcc46.patch new file mode 100644 index 0000000..c95f126 --- /dev/null +++ b/gperftools_gcc46.patch @@ -0,0 +1,12 @@ +Index: google-perftools-1.8/src/base/elf_mem_image.h +=================================================================== +--- google-perftools-1.8.orig/src/base/elf_mem_image.h ++++ google-perftools-1.8/src/base/elf_mem_image.h +@@ -46,6 +46,7 @@ + + #define HAVE_ELF_MEM_IMAGE 1 + ++#include + #include + #include // for ElfW +