This is an automated email from the ASF dual-hosted git repository. granthenke pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/kudu.git
commit 713fee390d0241bf466f490d5b2c678f7ebe5175 Author: Grant Henke <[email protected]> AuthorDate: Thu Dec 3 08:58:04 2020 -0600 [thirdparty] Upgrade to gperftools 2.8 This patch upgrades to gperftools 2.8 from 2.6.90. Additionally it introduces a patch that allows the profiler to build on and arm64 based (M1 processor) Apple machine. https://github.com/gperftools/gperftools/pull/1233 Change-Id: Ib59f875cac185ece7d40f22314eea7a0f2ee0246 Reviewed-on: http://gerrit.cloudera.org:8080/16789 Tested-by: Grant Henke <[email protected]> Reviewed-by: Alexey Serbin <[email protected]> Reviewed-by: Andrew Wong <[email protected]> --- thirdparty/download-thirdparty.sh | 2 +- thirdparty/patches/gperftools-osx-arm64.patch | 21 ++++++++++++++++++ thirdparty/patches/gperftools-unbreak-memz.patch | 28 ------------------------ thirdparty/vars.sh | 2 +- 4 files changed, 23 insertions(+), 30 deletions(-) diff --git a/thirdparty/download-thirdparty.sh b/thirdparty/download-thirdparty.sh index 556d471..63f746f 100755 --- a/thirdparty/download-thirdparty.sh +++ b/thirdparty/download-thirdparty.sh @@ -199,7 +199,7 @@ fetch_and_patch \ $GPERFTOOLS_SOURCE \ $GPERFTOOLS_PATCHLEVEL \ "patch -p1 < $TP_DIR/patches/gperftools-Replace-namespace-base-with-namespace-tcmalloc.patch" \ - "patch -p1 < $TP_DIR/patches/gperftools-unbreak-memz.patch" \ + "patch -p1 < $TP_DIR/patches/gperftools-osx-arm64.patch" \ "autoreconf -fvi" # NOTE: creating an empty 'third_party/googletest/m4' subdir is a recipe from diff --git a/thirdparty/patches/gperftools-osx-arm64.patch b/thirdparty/patches/gperftools-osx-arm64.patch new file mode 100644 index 0000000..7c4cdec --- /dev/null +++ b/thirdparty/patches/gperftools-osx-arm64.patch @@ -0,0 +1,21 @@ +From 23f7072ab6bfa5c0d1b45cf1e8d66053c7b738a8 Mon Sep 17 00:00:00 2001 +From: Grant Henke <[email protected]> +Date: Thu, 26 Nov 2020 20:56:46 -0600 +Subject: [PATCH] Add OS X arm64 program counter + +--- + m4/pc_from_ucontext.m4 | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/m4/pc_from_ucontext.m4 b/m4/pc_from_ucontext.m4 +index 0c7ee281..6e8b5d00 100644 +--- a/m4/pc_from_ucontext.m4 ++++ b/m4/pc_from_ucontext.m4 +@@ -43,6 +43,7 @@ AC_DEFUN([AC_PC_FROM_UCONTEXT], + pc_fields="$pc_fields uc_mcontext->__ss.__rip" # OS X (>=10.5 [untested]) + pc_fields="$pc_fields uc_mcontext->ss.srr0" # OS X (ppc, ppc64 [untested]) + pc_fields="$pc_fields uc_mcontext->__ss.__srr0" # OS X (>=10.5 [untested]) ++ pc_fields="$pc_fields uc_mcontext->__ss.__pc" # OS X (arm64 [untested]) + pc_field_found=false + for pc_field in $pc_fields; do + if ! $pc_field_found; then \ No newline at end of file diff --git a/thirdparty/patches/gperftools-unbreak-memz.patch b/thirdparty/patches/gperftools-unbreak-memz.patch deleted file mode 100644 index 8115ed1..0000000 --- a/thirdparty/patches/gperftools-unbreak-memz.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 47c99cf492fa340671fa89afec263b8d6e859755 Mon Sep 17 00:00:00 2001 -From: Aliaksey Kandratsenka <[email protected]> -Date: Sat, 24 Mar 2018 18:29:06 -0700 -Subject: [PATCH] unbreak printing large span stats - -One of recent commits started passing kMaxPages to printf but not used -it. Thankfully compilers gave us warning. Apparently intention was to -print real value of kMaxPages, so this is what we're doing now. ---- - src/tcmalloc.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/src/tcmalloc.cc b/src/tcmalloc.cc -index 1f22dfb..52af2dd 100644 ---- a/src/tcmalloc.cc -+++ b/src/tcmalloc.cc -@@ -517,9 +517,9 @@ static void DumpStats(TCMalloc_Printer* out, int level) { - - total_normal += large.normal_pages; - total_returned += large.returned_pages; -- out->printf(">128 large * %6u spans ~ %6.1f MiB; %6.1f MiB cum" -+ out->printf(">%-5u large * %6u spans ~ %6.1f MiB; %6.1f MiB cum" - "; unmapped: %6.1f MiB; %6.1f MiB cum\n", -- kMaxPages, -+ static_cast<unsigned int>(kMaxPages), - static_cast<unsigned int>(large.spans), - PagesToMiB(large.normal_pages + large.returned_pages), - PagesToMiB(total_normal + total_returned), diff --git a/thirdparty/vars.sh b/thirdparty/vars.sh index 04fa883..f124f5a 100644 --- a/thirdparty/vars.sh +++ b/thirdparty/vars.sh @@ -50,7 +50,7 @@ GMOCK_VERSION=1.8.0 GMOCK_NAME=googletest-release-$GMOCK_VERSION GMOCK_SOURCE=$TP_SOURCE_DIR/$GMOCK_NAME -GPERFTOOLS_VERSION=2.6.90 +GPERFTOOLS_VERSION=2.8 GPERFTOOLS_NAME=gperftools-$GPERFTOOLS_VERSION GPERFTOOLS_SOURCE=$TP_SOURCE_DIR/$GPERFTOOLS_NAME
