From 58bd55d836b5b7a4634d868f0a635343255b838ed069e5016f7601d013b13f32 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Wed, 6 Jan 2021 13:57:49 +0000 Subject: [PATCH] Accepting request 860400 from home:polslinux:branches:devel:libraries:c_c++ - Update to 2.8.1: * previous release contained change to release memory without page heap lock, but this change had at least one bug that caused to crashes and corruption when running under aggressive decommit mode (this is not default). While we check for other bugs, this feature was reverted. See github issue #1204 and issue #1227. * stack traces depth captured by gperftools is now up to 254 levels deep * updated detection of program counter * ProfilerGetStackTrace is now officially supported API for libprofiler * for compiling linux syscall support on i386 and recent GCCs * test failures caused by new gcc 10 optimizations were fixed. Same change also fixed tests on clang. - Drop ppc64-fix-367fd5731a8c68225cb870aa656ea0ce677fe040.patch - Drop gcc-dont-clobber-rsp.patch OBS-URL: https://build.opensuse.org/request/show/860400 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/gperftools?expand=0&rev=52 --- gcc-dont-clobber-rsp.patch | 26 ------- gperftools-2.7.tar.gz | 3 - gperftools-2.8.1.tar.gz | 3 + gperftools.changes | 20 ++++++ gperftools.spec | 36 +++++----- ...d5731a8c68225cb870aa656ea0ce677fe040.patch | 69 ------------------- 6 files changed, 41 insertions(+), 116 deletions(-) delete mode 100644 gcc-dont-clobber-rsp.patch delete mode 100644 gperftools-2.7.tar.gz create mode 100644 gperftools-2.8.1.tar.gz delete mode 100644 ppc64-fix-367fd5731a8c68225cb870aa656ea0ce677fe040.patch diff --git a/gcc-dont-clobber-rsp.patch b/gcc-dont-clobber-rsp.patch deleted file mode 100644 index b0ae749..0000000 --- a/gcc-dont-clobber-rsp.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 9e5b1628737c67b4587f937164572774592978c4 Mon Sep 17 00:00:00 2001 -From: Aliaksey Kandratsenka -Date: Sun, 10 Feb 2019 12:46:18 -0800 -Subject: [PATCH] don't try to mark rsp as clobbered in linux syscall support - -rsp is not actually clobbered by that code and later gccs actually (correctly) bark -at it. - -Fixed issue #1076. ---- - src/base/linux_syscall_support.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/base/linux_syscall_support.h b/src/base/linux_syscall_support.h -index 13aa415e..199061a9 100644 ---- a/src/base/linux_syscall_support.h -+++ b/src/base/linux_syscall_support.h -@@ -1485,7 +1485,7 @@ struct kernel_stat { - "d"(LSS_SYSCALL_ARG(parent_tidptr)), - "r"(LSS_SYSCALL_ARG(newtls)), - "r"(LSS_SYSCALL_ARG(child_tidptr)) -- : "rsp", "memory", "r8", "r10", "r11", "rcx"); -+ : "memory", "r8", "r10", "r11", "rcx"); - } - LSS_RETURN(int, __res); - } diff --git a/gperftools-2.7.tar.gz b/gperftools-2.7.tar.gz deleted file mode 100644 index c085721..0000000 --- a/gperftools-2.7.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:1ee8c8699a0eff6b6a203e59b43330536b22bbcbe6448f54c7091e5efb0763c9 -size 1523562 diff --git a/gperftools-2.8.1.tar.gz b/gperftools-2.8.1.tar.gz new file mode 100644 index 0000000..505f226 --- /dev/null +++ b/gperftools-2.8.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:12f07a8ba447f12a3ae15e6e3a6ad74de35163b787c0c7b76288d7395f2f74e0 +size 1598384 diff --git a/gperftools.changes b/gperftools.changes index cf215af..75e6c59 100644 --- a/gperftools.changes +++ b/gperftools.changes @@ -1,3 +1,23 @@ +------------------------------------------------------------------- +Tue Jan 5 08:23:07 UTC 2021 - Paolo Stivanin + +- Update to 2.8.1: + * previous release contained change to release memory without page + heap lock, but this change had at least one bug that caused to + crashes and corruption when running under aggressive decommit mode + (this is not default). While we check for other bugs, this feature + was reverted. See github issue #1204 and issue #1227. + * stack traces depth captured by gperftools is now up to 254 levels + deep + * updated detection of program counter + * ProfilerGetStackTrace is now officially supported API for + libprofiler + * for compiling linux syscall support on i386 and recent GCCs + * test failures caused by new gcc 10 optimizations were fixed. Same + change also fixed tests on clang. +- Drop ppc64-fix-367fd5731a8c68225cb870aa656ea0ce677fe040.patch +- Drop gcc-dont-clobber-rsp.patch + ------------------------------------------------------------------- Fri Sep 4 20:33:52 UTC 2020 - Jan Engelhardt diff --git a/gperftools.spec b/gperftools.spec index 6832ce2..9ef0df5 100644 --- a/gperftools.spec +++ b/gperftools.spec @@ -1,7 +1,7 @@ # # spec file for package gperftools # -# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2021 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,7 +17,7 @@ Name: gperftools -Version: 2.7 +Version: 2.8.1 Release: 0 Summary: Performance Tools for C++ License: BSD-3-Clause @@ -26,23 +26,25 @@ URL: https://github.com/gperftools/gperftools Source0: https://github.com/gperftools/gperftools/releases/download/gperftools-%{version}/gperftools-%{version}.tar.gz Patch1: %{name}_fix_unassigned_malloc_in_unittest.patch Patch2: %{name}_gcc46.patch -Patch3: gcc-dont-clobber-rsp.patch -Patch4: ppc64-fix-367fd5731a8c68225cb870aa656ea0ce677fe040.patch BuildRequires: autoconf >= 2.59 BuildRequires: automake BuildRequires: gcc-c++ BuildRequires: libtool -%ifnarch s390x s390 -BuildRequires: libunwind-devel -%endif -BuildRequires: pkg-config -%ifnarch s390 -BuildRequires: valgrind-devel -%endif -# based on basictypes.h in the source tree -ExclusiveArch: %ix86 x86_64 ppc ppc64 ppc64le %arm aarch64 mips s390x +BuildRequires: pkgconfig Provides: google-perftools Obsoletes: google-perftools +# based on basictypes.h in the source tree +ExclusiveArch: %{ix86} x86_64 ppc ppc64 ppc64le %{arm} aarch64 mips s390x +%ifnarch s390x s390 +BuildRequires: pkgconfig(libunwind) +BuildRequires: pkgconfig(libunwind-coredump) +BuildRequires: pkgconfig(libunwind-generic) +BuildRequires: pkgconfig(libunwind-ptrace) +BuildRequires: pkgconfig(libunwind-setjmp) +%endif +%ifnarch s390 +BuildRequires: pkgconfig(valgrind) +%endif %description The gperftools package contains some utilities to improve and analyze the @@ -103,23 +105,21 @@ export CFLAGS="%{optflags} -fno-strict-aliasing $VALGRIND_FL" --with-gnu-ld \ --with-pic \ --docdir=%{_defaultdocdir}/%{name} -make %{?_smp_mflags} +%make_build %install %make_install find %{buildroot} -type f -name "*.la" -delete -print %post -n libprofiler0 -p /sbin/ldconfig - %postun -n libprofiler0 -p /sbin/ldconfig - %post -n libtcmalloc4 -p /sbin/ldconfig - %postun -n libtcmalloc4 -p /sbin/ldconfig %files %{_bindir}/pprof -%{_mandir}/man1/pprof.1.* +%{_bindir}/pprof-symbolize +%{_mandir}/man1/pprof.1%{?ext_man} %{_docdir}/%{name} %files -n libprofiler0 diff --git a/ppc64-fix-367fd5731a8c68225cb870aa656ea0ce677fe040.patch b/ppc64-fix-367fd5731a8c68225cb870aa656ea0ce677fe040.patch deleted file mode 100644 index 8347dcb..0000000 --- a/ppc64-fix-367fd5731a8c68225cb870aa656ea0ce677fe040.patch +++ /dev/null @@ -1,69 +0,0 @@ -From 367fd5731a8c68225cb870aa656ea0ce677fe040 Mon Sep 17 00:00:00 2001 -From: Tulio Magno Quites Machado Filho -Date: Fri, 8 Feb 2019 10:33:09 -0200 -Subject: [PATCH] Include asm/ptrace.h when accessing ucontext_t - -In some architectures (e.g. powerpc, powerpc64 and powerpc64le), the -macro that specifies the position of the program counter is defined in -header asm/ptrace.h. - -When glibc bug 21457 got fixed in version 2.27, header sys/ucontext.h -stopped including signal.h, which indirectly removed asm/ptrace.h too. - -Signed-off-by: Tulio Magno Quites Machado Filho ---- - m4/pc_from_ucontext.m4 | 12 +++++++++++- - src/getpc.h | 3 +++ - 2 files changed, 14 insertions(+), 1 deletion(-) - -diff --git a/m4/pc_from_ucontext.m4 b/m4/pc_from_ucontext.m4 -index c9224bc6..7114bd0d 100644 ---- a/m4/pc_from_ucontext.m4 -+++ b/m4/pc_from_ucontext.m4 -@@ -20,6 +20,7 @@ AC_DEFUN([AC_PC_FROM_UCONTEXT], - AC_CHECK_HEADERS(sys/ucontext.h) # ucontext on OS X 10.6 (at least) - fi - AC_CHECK_HEADERS(cygwin/signal.h) # ucontext on cywgin -+ AC_CHECK_HEADERS(asm/ptrace.h) # get ptrace macros, e.g. PT_NIP - AC_MSG_CHECKING([how to access the program counter from a struct ucontext]) - pc_fields=" uc_mcontext.gregs[[REG_PC]]" # Solaris x86 (32 + 64 bit) - pc_fields="$pc_fields uc_mcontext.gregs[[REG_EIP]]" # Linux (i386) -@@ -53,14 +54,23 @@ AC_DEFUN([AC_PC_FROM_UCONTEXT], - How to access the PC from a struct ucontext) - AC_MSG_RESULT([$pc_field]) - pc_field_found=true) -- elif test "x$ac_cv_header_sys_ucontext_h" = xyes; then -+ elif test "x$ac_cv_header_asm_ptrace_h" = xyes -a "x$ac_cv_header_sys_ucontext_h" = xyes; then - AC_TRY_COMPILE([#define _GNU_SOURCE 1 -+ #include - #include ], - [ucontext_t u; return u.$pc_field == 0;], - AC_DEFINE_UNQUOTED(PC_FROM_UCONTEXT, $pc_field, - How to access the PC from a struct ucontext) - AC_MSG_RESULT([$pc_field]) - pc_field_found=true) -+ elif test "x$ac_cv_header_sys_ucontext_h" = xyes; then -+ AC_TRY_COMPILE([#define _GNU_SOURCE 1 -+ #include ], -+ [ucontext_t u; return u.$pc_field == 0;], -+ AC_DEFINE_UNQUOTED(PC_FROM_UCONTEXT, $pc_field, -+ How to access the PC from a struct ucontext) -+ AC_MSG_RESULT([$pc_field]) -+ pc_field_found=true) - elif test "x$ac_cv_header_ucontext_h" = xyes; then - AC_TRY_COMPILE([#define _GNU_SOURCE 1 - #include ], -diff --git a/src/getpc.h b/src/getpc.h -index 163873ea..9605363b 100644 ---- a/src/getpc.h -+++ b/src/getpc.h -@@ -56,6 +56,9 @@ - //#define _XOPEN_SOURCE 500 - - #include // for memcmp -+#ifdef HAVE_ASM_PTRACE_H -+#include -+#endif - #if defined(HAVE_SYS_UCONTEXT_H) - #include - #elif defined(HAVE_UCONTEXT_H)