Skip to contentSkip to conversation

gperftools: Update SRCREV to point to 2.9.1 release

PATCH New Khem Raj 1 participant 1 message Mar 13, 2021

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/1 gperftools: Update SRCREV to point to 2.9.1 release

Refresh patches
Drop upstreamed patch 0001-profile-handler-Specify-libc-specific-thread_id.patch Fix build on musl/ppc
Disable heap and cpu profilers on ppc64le/musl since it does not build stacktrace utility yet

---
 ...checkers-and-debug-allocator-on-musl.patch |  6 +-
 .../0001-fix-build-with-musl-libc.patch       | 13 ++--
 ...dler-Specify-libc-specific-thread_id.patch | 38 -----------
 .../disable_libunwind_aarch64.patch           |  4 +-
 .../gperftools/gperftools/ppc-musl.patch      | 66 +++++++++++++++++++
 .../gperftools/gperftools/sgidef.patch        |  2 -
 .../gperftools/gperftools_2.9.1.bb            |  9 ++-
 7 files changed, 79 insertions(+), 59 deletions(-)
 delete mode 100644 meta-oe/recipes-support/gperftools/gperftools/0001-profile-handler-Specify-libc-specific-thread_id.patch
 create mode 100644 meta-oe/recipes-support/gperftools/gperftools/ppc-musl.patch
meta-oe/recipes-support/gperftools/gperftools/0001-disbale-heap-checkers-and-debug-allocator-on-musl.patch +2 -4
index ab3ceb964f..e3e857f0c2 100644
@@ -11,11 +11,9 @@ Upstream-Status: Pending
  configure.ac | 2 ++
  1 file changed, 2 insertions(+)
 
-diff --git a/configure.ac b/configure.ac
-index 70b49a3..8154c5c 100644
 --- a/configure.ac
 +++ b/configure.ac
-@@ -51,6 +51,8 @@ case "$host" in
+@@ -53,6 +53,8 @@ case "$host" in
     *-cygwin*) default_enable_heap_checker=no; default_enable_cpu_profiler=no;;
     *-freebsd*) default_enable_heap_checker=no;;
     *-darwin*) default_enable_heap_checker=no;;
@@ -23,4 +21,4 @@ index 70b49a3..8154c5c 100644
 +            default_enable_debugalloc=no; default_enable_libunwind=no;
  esac
  
- # Currently only backtrace works on s390.
+ # Currently only backtrace works on s390 and OSX.
meta-oe/recipes-support/gperftools/gperftools/0001-fix-build-with-musl-libc.patch +4 -9
index cb4ead3176..baaaa4b53b 100644
@@ -10,13 +10,11 @@ Signed-off-by: Khem Raj <[email protected]>
  src/malloc_hook_mmap_linux.h | 6 +++++-
  1 file changed, 5 insertions(+), 1 deletion(-)
 
-diff --git a/src/malloc_hook_mmap_linux.h b/src/malloc_hook_mmap_linux.h
-index e2efb05..66b3110 100644
 --- a/src/malloc_hook_mmap_linux.h
 +++ b/src/malloc_hook_mmap_linux.h
-@@ -46,6 +46,10 @@
- #include <errno.h>
- #include "base/linux_syscall_support.h"
+@@ -45,6 +45,10 @@
+ #include <sys/syscall.h>
+ #include <unistd.h>
  
 +#ifndef __GLIBC__
 +typedef off64_t   __off64_t;
@@ -25,7 +23,7 @@ index e2efb05..66b3110 100644
  // The x86-32 case and the x86-64 case differ:
  // 32b has a mmap2() syscall, 64b does not.
  // 64b and 32b have different calling conventions for mmap().
-@@ -175,7 +179,7 @@ extern "C" void* mmap64(void *start, size_t length, int prot, int flags,
+@@ -175,7 +179,7 @@ extern "C" void* mmap64(void *start, siz
    return result;
  }
  
@@ -34,6 +32,3 @@ index e2efb05..66b3110 100644
  
  extern "C" void* mmap(void *start, size_t length, int prot, int flags,
                        int fd, off_t offset) __THROW {
--- 
-2.17.1
-
meta-oe/recipes-support/gperftools/gperftools/0001-profile-handler-Specify-libc-specific-thread_id.patch deleted +0 -38
deleted file mode 100644
index 4029a69c5c..0000000000
@@ -1,38 +0,0 @@
-From 0a504852ed6e56620d1df26b503c4aa2b5b74760 Mon Sep 17 00:00:00 2001
-From: Khem Raj <[email protected]>
-Date: Sat, 31 Oct 2020 16:12:36 -0700
-Subject: [PATCH] profile-handler: Specify libc specific thread_id
-
-We need to know internal _sigev_un is glibc specific, add an else for
-musl case
-
-Fixes build issue
-../git/src/profile-handler.cc:275:8: error: no member named '_sigev_un' in 'sigevent'
-  sevp._sigev_un._tid = sys_gettid();
-  ~~~~ ^
-
-Upstream-Status: Pending
-Signed-off-by: Khem Raj <[email protected]>
----
- src/profile-handler.cc | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/src/profile-handler.cc b/src/profile-handler.cc
-index 7fdcb69..5867118 100644
---- a/src/profile-handler.cc
-+++ b/src/profile-handler.cc
-@@ -272,7 +272,11 @@ static void StartLinuxThreadTimer(int timer_type, int signal_number,
-   struct itimerspec its;
-   memset(&sevp, 0, sizeof(sevp));
-   sevp.sigev_notify = SIGEV_THREAD_ID;
-+#ifdef __GLIBC__
-   sevp._sigev_un._tid = sys_gettid();
-+#else
-+  sevp.sigev_notify_thread_id = sys_gettid();
-+#endif
-   sevp.sigev_signo = signal_number;
-   clockid_t clock = CLOCK_THREAD_CPUTIME_ID;
-   if (timer_type == ITIMER_REAL) {
--- 
-2.29.2
-
meta-oe/recipes-support/gperftools/gperftools/disable_libunwind_aarch64.patch +1 -3
index c3c5784186..15eacc8993 100644
@@ -12,11 +12,9 @@ Signed-off-by: Khem Raj <[email protected]>
  configure.ac | 5 +++++
  1 file changed, 5 insertions(+)
 
-diff --git a/configure.ac b/configure.ac
-index 8154c5c..063b260 100644
 --- a/configure.ac
 +++ b/configure.ac
-@@ -69,6 +69,11 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM(, [return __PPC64__])],
+@@ -76,6 +76,11 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM(, [re
                    [default_enable_libunwind=yes
                     default_tcmalloc_pagesize=8])
  
meta-oe/recipes-support/gperftools/gperftools/ppc-musl.patch new file +66 -0

66 lines not on this page · raw message

meta-oe/recipes-support/gperftools/gperftools/sgidef.patch +0 -2
index 10274a6dec..b01cba39cd 100644
@@ -10,8 +10,6 @@ Upstream-Status: Pending
  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 70431ca..b23ca59 100644
 --- a/src/base/linux_syscall_support.h
 +++ b/src/base/linux_syscall_support.h
 @@ -164,7 +164,7 @@ extern "C" {
meta-oe/recipes-support/gperftools/gperftools_2.9.1.bb +6 -3
index 97942278db..bf8cb90178 100644
@@ -8,16 +8,19 @@ Included are an optimized thread-caching malloc() and cpu and heap profiling uti
 LICENSE = "BSD-3-Clause"
 LIC_FILES_CHKSUM = "file://COPYING;md5=762732742c73dc6c7fbe8632f06c059a"
 
-SRCREV = "d8eb315fb18f6fb0d6efa923401f166343727bc6"
+DEPENDS_append_libc-musl = " libucontext"
+
+SRCREV = "f7c6fb6c8e99d6b1b725e5994373bcd19ffdf8fd"
 SRC_URI = "git://github.com/gperftools/gperftools \
            file://0001-Support-Atomic-ops-on-clang.patch \
            file://0001-fix-build-with-musl-libc.patch \
            file://0001-disbale-heap-checkers-and-debug-allocator-on-musl.patch \
            file://disable_libunwind_aarch64.patch \
            file://sgidef.patch \
-           file://0001-profile-handler-Specify-libc-specific-thread_id.patch \
            "
 
+SRC_URI_append_libc-musl = " file://ppc-musl.patch"
+
 inherit autotools
 
 S = "${WORKDIR}/git"
@@ -36,6 +39,7 @@ COMPATIBLE_HOST_riscv32 = "null"
 ARM_INSTRUCTION_SET_armv5 = "arm"
 ARM_INSTRUCTION_SET_toolchain-clang_arm = "arm"
 
+EXTRA_OECONF_append_libc-musl_powerpc64le = " --disable-cpu-profiler --disable-heap-profiler --disable-heap-checker"
 PACKAGECONFIG ?= "libunwind static"
 PACKAGECONFIG_remove_arm_libc-musl = "libunwind"
 PACKAGECONFIG_remove_riscv64 = "libunwind"
@@ -60,4 +64,3 @@ RDEPENDS_${PN} += " \
 "
 
 RDEPENDS_${PN} += "libtcmalloc-minimal (= ${EXTENDPKGV})"
-
Signature · 1 line
2.30.2