--- google-perftools-2.4.orig/debian/README
+++ google-perftools-2.4/debian/README
@@ -0,0 +1,7 @@
+The list of files here isn't complete.  For a step-by-step guide on
+how to set this package up correctly, check out
+    http://www.debian.org/doc/maint-guide/
+
+Most of the files that are in this directory are boilerplate.
+However, you may need to change the list of binary-arch dependencies
+in 'rules'.
--- google-perftools-2.4.orig/debian/README.Debian
+++ google-perftools-2.4/debian/README.Debian
@@ -0,0 +1,5 @@
+Because of a file conflict between tau and libgoogle-perftools [1]
+the binary pprof is renamed as google-pprof,
+its manpage in Debian is /usr/share/man/man1/google-pprof.1.gz.
+
+[1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=404001.
--- google-perftools-2.4.orig/debian/changelog
+++ google-perftools-2.4/debian/changelog
@@ -0,0 +1,259 @@
+google-perftools (2.4-0ubuntu4~cloud0) trusty-liberty; urgency=medium
+
+  * New update for the Ubuntu Cloud Archive.
+
+ -- Openstack Ubuntu Testing Bot <openstack-testing-bot@ubuntu.com>  Fri, 31 Jul 2015 16:58:48 +0000
+
+google-perftools (2.4-0ubuntu4) wily; urgency=medium
+
+  * Build using GCC 5.
+
+ -- Matthias Klose <doko@ubuntu.com>  Wed, 08 Jul 2015 23:17:29 +0200
+
+google-perftools (2.4-0ubuntu2) wily; urgency=medium
+
+  * Re-enable the build on Aarch64.
+  * Disable the tests again on armhf and arm64.
+
+ -- Matthias Klose <doko@ubuntu.com>  Wed, 08 Jul 2015 23:14:30 +0200
+
+google-perftools (2.4-0ubuntu1) wily; urgency=medium
+
+  * New upstream version.
+  * Enable futexes on ARM32 (taken from Fedora).
+  * Enable tests everywhere for a first upload.
+
+ -- Matthias Klose <doko@ubuntu.com>  Wed, 08 Jul 2015 15:18:35 +0200
+
+google-perftools (2.2.1-0.2) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Add actual arm64 support (Closes: #763837)
+
+ -- Wookey <wookey@debian.org>  Thu, 02 Oct 2014 02:23:32 +0000
+
+google-perftools (2.2.1-0.1) unstable; urgency=medium
+
+  * Non-maintainer upload
+  * New upstream release. (Closes: #757149)
+  * Updated watch file
+  * Added ppc64el, arm64 architectures (Closes: #737677)
+
+ -- Hilko Bengen <bengen@debian.org>  Sun, 07 Sep 2014 21:22:29 +0200
+
+google-perftools (2.1-2) unstable; urgency=low
+
+  * Now builds with automake 1.11. (Closes: #724381)
+    Thanks to Eric Dorland for a patch.
+
+ -- Daigo Moriwaki <daigo@debian.org>  Sun, 04 Aug 2013 22:08:47 +0900
+
+google-perftools (2.1-1) unstable; urgency=low
+
+  * New upstream release. (Closes: #701378)
+  * debian/rules:
+    - Enable tests on amd64 and i386. (Closes: #695293)
+  * debian/control:
+    - Add missing dependency on libunwind8-dev for amd64 architecture
+      to libgoogle-perftools-dev. (Closes: #706860)
+    - Add new architectures: armel armhf. (Closes: #695308)
+    - Bumped up Standards-Version to 3.9.4.
+  * Removed debian/patches/20120708_ppc_ftbfs.patch, which has been applied by
+    the upstream.
+
+ -- Daigo Moriwaki <daigo@debian.org>  Sun, 04 Aug 2013 21:21:26 +0900
+
+google-perftools (2.0-4) unstable; urgency=low
+
+  * Added debian/patches/20121013-pprof.1.patch: Corrects a link.
+    Thanks to Junichi Uekawa for reporting.  (Closes: #690313)
+
+ -- Daigo Moriwaki <daigo@debian.org>  Sun, 08 Jul 2012 19:26:52 +0900
+
+google-perftools (2.0-3) unstable; urgency=low
+
+  * debian/patches/20120708_ppc_ftbfs.patch: Imported Ubuntu's patch, fixing
+    a build failure on powerpc, derived from the upstream:
+    http://code.google.com/p/gperftools/issues/detail?id=431
+    Thanks to James Page <james.page@ubuntu.com>. (Closes: #680305)
+  * debian/control: Bumped up to libunwind8-dev for Build-Depends.
+    (Closes: #680724)
+
+ -- Daigo Moriwaki <daigo@debian.org>  Sun, 08 Jul 2012 18:08:36 +0900
+
+google-perftools (2.0-2) unstable; urgency=low
+
+  * Some include files were left out of the package.
+    Thanks to Laszlo Boszormenyi for a patch.  (Closes: #666099)
+
+ -- Daigo Moriwaki <daigo@debian.org>  Sat, 31 Mar 2012 12:50:36 +0900
+
+google-perftools (2.0-1) unstable; urgency=low
+
+  * New upstream release.
+    (Closes: #663652, #635038)
+  * debian/watch: Followed the new upstream site.
+  * debian/control:
+    - Followed the new upstream site.
+    - Bumped up Standards-Version to 3.9.3.
+    - google-perftools depends on curl.  (Closes: #630829)
+    - Updated the package names to match soname 4.
+  * debian/copyright:
+    - Followed the upstream' changes.
+    - Applied copyright-format 1.0.
+  * debian/compat:
+    - Bumped up the compatibility level to 7.
+
+ -- Daigo Moriwaki <daigo@debian.org>  Sat, 17 Mar 2012 14:58:23 +0900
+
+google-perftools (1.7-1) unstable; urgency=low
+
+  * New upstream release
+  * Updated debian/watch.
+  * debian/control:
+    - removed the meaningless google-perftools-dbg package.
+    - google-perftools that only includes a perl script is now Architecture:
+      all.
+    (Closes: #595184)
+    - Bumped up Standards-Version to 3.9.1.
+  * debian/copyright: packaged by myself.
+
+ -- Daigo Moriwaki <daigo@debian.org>  Sun, 06 Mar 2011 10:35:04 +0900
+
+google-perftools (1.5-1) unstable; urgency=low
+
+  * New upstream release (Closes: #521935)
+  * Now this package will be built on i386, amd64 and powerpc
+    (Closes: #387401, #506679, #556908)
+  * debian/control: Bumped up Standards-Version to 3.8.4.
+
+ -- Daigo Moriwaki <daigo@debian.org>  Sun, 07 Feb 2010 09:57:09 +0900
+
+google-perftools (1.4-3) unstable; urgency=low
+
+  * debian/control: Bumpled up Standards-Version to 3.8.3.
+  * debian/control: google-perftools package now recommends graphviz and gv.
+    (Closes: #507823)
+  * debian/{control|rules}: autoconf and automake will be executed in a build
+    time. (Closes: #558508)
+
+ -- Daigo Moriwaki <daigo@debian.org>  Mon, 30 Nov 2009 21:53:39 +0900
+
+google-perftools (1.4-2) unstable; urgency=low
+
+  * debian/control, debian/rules: Added a new package, google-perftools, which
+    contains command line utilities.  (Closes: #547956)
+
+ -- Daigo Moriwaki <daigo@debian.org>  Mon, 26 Oct 2009 20:19:18 +0900
+
+google-perftools (1.4-1) unstable; urgency=low
+
+  * New upstream release. (Closes: #537269)
+  * debian/control:
+    - Bumped up Standards-Version to 3.8.2.
+    - Build-depends on libunwind. (Closes: #487374)
+    - Provides debugging symbol packages: libtcmalloc-minimal0-dbg and
+      libgoogle-perftools0-dbg.
+  * Merged contents of
+    - debian/libgoogle-perftools0.docs
+    - debian/libgoogle-perftools0.manpages
+    - debian/docs
+    - debian/libtcmalloc-minimal0.dirs
+    - debian/libgoogle-perftools-dev.dirs
+    - debian/libtcmalloc-minimal0.install
+    - debian/libgoogle-perftools0.dirs
+    - debian/libgoogle-perftools-dev.install
+    - debian/libgoogle-perftools0.install
+    into debian/rules.
+
+ -- Daigo Moriwaki <daigo@debian.org>  Sat, 19 Sep 2009 00:10:06 +0900
+
+google-perftools (0.98-1) unstable; urgency=low
+
+  * New upstream release. (Closes: #425147)
+  * Compiled with GCC 4.3. (Closes: #454841)
+  * debian/watch: can now report upstream's version (Closes: #450294)
+  * Because of a file conflict between tau and libgoogle-perftools the
+    binary pprof is renamed as google-pprof. (Closes: #404001)
+    Great thanks to Michael Mende.
+  * debian/rules: autoconf files are now generated at the build time.
+  * Bumped up Standards-Version to 3.7.3, no changes are required.
+  * Split a new package, libtcmallc_minimal0. The upstream supports
+    this module for wider platforms. So I leave its architecture to be
+    `any'.
+  * libgoogle-perftools0's architecture is now i386. The upstream
+    supports this module for x86 and x86_64. However, x86_64 requires
+    libunwind's development head, which Debian does not have yet.
+  * Removed an unnecessary patch, debian/patches/02_profiler.cc_alpha.diff.
+
+ -- Daigo Moriwaki <daigo@debian.org>  Sun, 15 Jun 2008 23:41:36 +0900
+
+google-perftools (0.91-1) unstable; urgency=low
+
+  * New upstream release
+  * The hosting site of the upstream has been changed. 
+
+ -- Daigo Moriwaki <daigo@debian.org>  Sat, 12 May 2007 15:56:25 +0900
+
+google-perftools (0.8-5) unstable; urgency=low
+
+  * Apply a patch from Yauheni Kaliuta to fix an error, 'sys_mmap' has not
+    been declared, which may happen with Linux kernel 2.6.18.
+    (Closes: #397908)
+
+ -- Daigo Moriwaki <daigo@debian.org>  Mon, 13 Nov 2006 12:13:52 +0900
+
+google-perftools (0.8-4) unstable; urgency=low
+
+  * Fixed FTBFS (alpha) again. debian/patches/01_configure.ac_alpha.diff is no
+    longer provided. Instead, configure.ac and configure are directly updated
+    to be correctly built. (Closes: #387401)  
+
+ -- Daigo Moriwaki <daigo@debian.org>  Thu, 14 Sep 2006 01:18:10 +0900
+
+google-perftools (0.8-3) unstable; urgency=low
+
+  * Use DEB_AUTO_UPDATE_AUTOCONF to rebuild configure from patched
+    configure.ac. 
+  * Fixed debian/watch file.
+
+ -- Daigo Moriwaki <daigo@debian.org>  Thu, 14 Sep 2006 00:09:39 +0900
+
+google-perftools (0.8-2) unstable; urgency=low
+
+  * Make pathces for FTBFS (alpha). Thanks to Falk Hueffner. (Closes: #384236)
+    (debian/patches/01_configure.ac_alpha.diff,
+     debian/patches/02_profiler.cc_alpha.diff)
+
+ -- Daigo Moriwaki <daigo@debian.org>  Tue, 20 Jun 2006 23:05:05 +0900
+
+google-perftools (0.8-1) unstable; urgency=low
+
+  * Remove the patches (thread_lister.c.diff and malloc_hook.cc.diff) that
+    were included in the previous release because the upstream has fixed the
+    issues.
+
+ -- Daigo Moriwaki <daigo@debian.org>  Tue, 20 Jun 2006 22:20:58 +0900
+
+google-perftools (0.7-2) unstable; urgency=low
+
+  * Make a patch (debian/patches/thread_lister.c.diff) for FTBFS: error:
+    conflicting types for 'ResumeAllProcessThreads' (Closes: #370449)
+  * Make a patch (debian/patches/malloc_hook.cc.diff) for FTBFS:
+    src/malloc_hook.cc:118: error: invalid conversion from 'long int' to
+    'void*' (Closes: #370802)
+  * Add a debian/watch file.
+
+ -- Daigo Moriwaki <daigo@debian.org>  Mon, 12 Jun 2006 20:00:35 +0900
+
+google-perftools (0.7-1) unstable; urgency=low
+
+  * New upstream release.
+
+ -- Daigo Moriwaki <daigo@debian.org>  Mon,  8 May 2006 20:08:10 +0900
+
+google-perftools (0.1-1) unstable; urgency=low
+
+  * Initial release.
+
+ -- Google Inc. <opensource@google.com>  Fri, 11 Mar 2005 08:07:33 -0800
--- google-perftools-2.4.orig/debian/compat
+++ google-perftools-2.4/debian/compat
@@ -0,0 +1 @@
+9
--- google-perftools-2.4.orig/debian/control
+++ google-perftools-2.4/debian/control
@@ -0,0 +1,75 @@
+Source: google-perftools
+Section: libs
+Priority: optional
+Maintainer: Daigo Moriwaki <daigo@debian.org>
+Build-Depends: cdbs, autoconf, automake1.11, libtool, patchutils, debhelper (>= 9.0.0), binutils, libunwind8-dev [amd64]
+Build-Conflicts: autoconf2.13, automake1.4
+Standards-Version: 3.9.4
+Homepage: http://code.google.com/p/gperftools/
+Vcs-Svn: svn://svn.debian.org/svn/collab-maint/deb-maint/google-perftools/trunk
+Vcs-Browser: http://svn.debian.org/viewvc/collab-maint/deb-maint/google-perftools/trunk/
+
+Package: libgoogle-perftools-dev
+Section: libdevel
+Architecture: i386 amd64 powerpc ppc64el arm64 armel armhf
+Depends: ${misc:Depends}, libgoogle-perftools4 (= ${binary:Version}), libtcmalloc-minimal4 (= ${binary:Version}), libunwind8-dev [amd64]
+Description: libraries for CPU and heap analysis, plus an efficient thread-caching malloc
+ The gperftools, previously called google-perftools, package 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.  The devel package contains static and debug libraries and header
+ files for developing applications that use the google-perftools package.
+
+Package: libtcmalloc-minimal4
+Section: libs
+Architecture: i386 amd64 powerpc ppc64el arm64 armel armhf
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: efficient thread-caching malloc
+ The gperftools, previously called google-perftools, package contains some
+ utilities to improve and analyze the performance of C++ programs. This is a
+ part of that package, and includes an optimized thread-caching malloc.
+
+Package: libtcmalloc-minimal4-dbg
+Section: debug
+Priority: extra
+Architecture: i386 amd64 powerpc ppc64el arm64 armel armhf
+Depends: ${misc:Depends}, libtcmalloc-minimal4 (= ${binary:Version})
+Description: efficient thread-caching malloc
+ Contains debugging symbols for libtcmalloc-minimal4.
+ .
+ This package is provided primarily to provide a backtrace with names
+ in a debugger, this makes it somewhat easier to interpret core
+ dumps.  Most people will not need this package.
+
+Package: libgoogle-perftools4
+Section: libs
+Architecture: i386 amd64 powerpc ppc64el arm64 armel armhf
+Depends: libtcmalloc-minimal4 (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends}
+Conflicts: libgoogle-perftools0
+Description: libraries for CPU and heap analysis, plus an efficient thread-caching malloc
+ The gperftools, previously called google-perftools, package contains some
+ utilities to improve and analyze the performance of C++ programs. This includes
+ the full features: an optimized thread-caching malloc() and cpu and heap
+ profiling utilities.
+
+Package: libgoogle-perftools4-dbg
+Section: debug
+Priority: extra
+Architecture: i386 amd64 powerpc ppc64el arm64 armel armhf
+Depends: ${misc:Depends}, libgoogle-perftools4 (= ${binary:Version})
+Description: libraries for CPU and heap analysis, plus an efficient thread-caching malloc
+ Contains debugging symbols for libgoogle-perftools4.
+ .
+ This package is provided primarily to provide a backtrace with names
+ in a debugger, this makes it somewhat easier to interpret core
+ dumps.  Most people will not need this package.
+
+Package: google-perftools
+Section: devel
+Architecture: all
+Depends: ${shlibs:Depends}, ${misc:Depends}, libgoogle-perftools4, curl
+Recommends: graphviz, gv
+Description: command line utilities to analyze the performance of C++ programs
+ The gperftools, previously called google-perftools, package contains some
+ utilities to improve and analyze the performance of C++ programs. This is a
+ part of that package, and includes command line utilities.
--- google-perftools-2.4.orig/debian/copyright
+++ google-perftools-2.4/debian/copyright
@@ -0,0 +1,57 @@
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: gperftools
+Upstream-Contact: google-perftools@googlegroups.com
+Source: http://code.google.com/p/gperftools/
+
+Files: *
+Copyright: Google Inc.
+License: BSD-3-clause
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+ .
+     * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+     * Redistributions in binary form must reproduce the above
+ copyright notice, this list of conditions and the following disclaimer
+ in the documentation and/or other materials provided with the
+ distribution.
+     * Neither the name of Google Inc. nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+ .
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Files: debian/*
+Copyright: Copyright 2011 Daigo Moriwaki <daigo@debian.org>
+License: GPL-2+
+ This program is free software; you can redistribute it
+ and/or modify it under the terms of the GNU General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later
+ version.
+ .
+ This program is distributed in the hope that it will be
+ useful, but WITHOUT ANY WARRANTY; without even the implied
+ warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.  See the GNU General Public License for more
+ details.
+ .
+ You should have received a copy of the GNU General Public
+ License along with this package; if not, write to the Free
+ Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ Boston, MA  02110-1301 USA
+ .
+ On Debian systems, the full text of the GNU General Public
+ License version 2 can be found in the file
+ `/usr/share/common-licenses/GPL-2'.
--- google-perftools-2.4.orig/debian/patches/20121013-pprof.1.patch
+++ google-perftools-2.4/debian/patches/20121013-pprof.1.patch
@@ -0,0 +1,11 @@
+--- ./doc/pprof.1~	2014-08-10 23:42:59.000000000 +0000
++++ ./doc/pprof.1	2015-07-08 13:20:47.869811750 +0000
+@@ -125,7 +125,7 @@
+ .B cpu_profiler.html
+ and is likely installed at one of the following locations:
+ .IP
+-.B /usr/share/gperftools/cpu_profiler.html
++.B /usr/share/doc/libgoogle-perftools-dev/cpuprofile.html
+ .br
+ .B /usr/local/share/gperftools/cpu_profiler.html
+ .PP
--- google-perftools-2.4.orig/debian/patches/gperftools-aarch64.patch
+++ google-perftools-2.4/debian/patches/gperftools-aarch64.patch
@@ -0,0 +1,176 @@
+--- google-perftools-2.4.orig/src/stacktrace.cc
++++ google-perftools-2.4/src/stacktrace.cc
+@@ -132,6 +132,15 @@
+ #define HAVE_GST_arm
+ #endif
+ 
++#if defined(__aarch64__)
++#define STACKTRACE_INL_HEADER "stacktrace_arm64-inl.h"
++#define GST_SUFFIX arm64
++#include "stacktrace_impl_setup-inl.h"
++#undef GST_SUFFIX
++#undef STACKTRACE_INL_HEADER
++#define HAVE_GST_arm64
++#endif
++
+ #ifdef TCMALLOC_ENABLE_INSTRUMENT_STACKTRACE
+ #define STACKTRACE_INL_HEADER "stacktrace_instrument-inl.h"
+ #define GST_SUFFIX instrument
+@@ -197,6 +206,8 @@
+ static GetStackImplementation *get_stack_impl = &impl__libunwind;
+ #elif defined(HAVE_GST_arm)
+ static GetStackImplementation *get_stack_impl = &impl__arm;
++#elif defined(HAVE_GST_arm64)
++static GetStackImplementation *get_stack_impl = &impl__arm64;
+ #elif defined(HAVE_GST_generic)
+ static GetStackImplementation *get_stack_impl = &impl__generic;
+ #elif 0
+@@ -208,6 +219,7 @@
+ # include "stacktrace_powerpc-inl.h"
+ # include "stacktrace_win32-inl.h"
+ # include "stacktrace_arm-inl.h"
++# include "stacktrace_arm64-inl.h"
+ # include "stacktrace_instrument-inl.h"
+ #else
+ #error Cannot calculate stack trace: will need to write for your environment
+--- google-perftools-2.4.orig/src/stacktrace_arm64-inl.h
++++ google-perftools-2.4/src/stacktrace_arm64-inl.h
+@@ -0,0 +1,138 @@
++// -*- Mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*-
++// Copyright (c) 2011, Google Inc.
++// All rights reserved.
++//
++// Redistribution and use in source and binary forms, with or without
++// modification, are permitted provided that the following conditions are
++// met:
++//
++//     * Redistributions of source code must retain the above copyright
++// notice, this list of conditions and the following disclaimer.
++//     * Redistributions in binary form must reproduce the above
++// copyright notice, this list of conditions and the following disclaimer
++// in the documentation and/or other materials provided with the
++// distribution.
++//     * Neither the name of Google Inc. nor the names of its
++// contributors may be used to endorse or promote products derived from
++// this software without specific prior written permission.
++//
++// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
++// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
++// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
++// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
++// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
++// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
++// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
++// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
++// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
++// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
++// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
++
++// ---
++// This is adapted from Doug Kwan's code for ARM.
++//
++
++#ifndef BASE_STACKTRACE_ARM64_INL_H_
++#define BASE_STACKTRACE_ARM64_INL_H_
++// Note: this file is included into stacktrace.cc more than once.
++// Anything that should only be defined once should be here:
++
++#include <stdint.h>   // for uintptr_t
++#include "base/basictypes.h"  // for NULL
++#include <gperftools/stacktrace.h>
++
++// Given a pointer to a stack frame, locate and return the calling
++// stackframe, or return NULL if no stackframe can be found. Perform sanity
++// checks (the strictness of which is controlled by the boolean parameter
++// "STRICT_UNWINDING") to reduce the chance that a bad pointer is returned.
++template<bool STRICT_UNWINDING>
++static void **NextStackFrame(void **old_sp) {
++  void **new_sp = (void**) old_sp[0];
++
++  // Check that the transition from frame pointer old_sp to frame
++  // pointer new_sp isn't clearly bogus
++  if (STRICT_UNWINDING) {
++    // With the stack growing downwards, older stack frame must be
++    // at a greater address that the current one.
++    if (new_sp <= old_sp) return NULL;
++    // Assume stack frames larger than 100,000 bytes are bogus.
++    if ((uintptr_t)new_sp - (uintptr_t)old_sp > 100000) return NULL;
++  } else {
++    // In the non-strict mode, allow discontiguous stack frames.
++    // (alternate-signal-stacks for example).
++    if (new_sp == old_sp) return NULL;
++    // And allow frames upto about 1MB.
++    if ((new_sp > old_sp)
++        && ((uintptr_t)new_sp - (uintptr_t)old_sp > 1000000)) return NULL;
++  }
++  if ((uintptr_t)new_sp & (sizeof(void *) - 1)) return NULL;
++  return new_sp;
++}
++
++// This ensures that GetStackTrace stes up the Link Register properly.
++#ifdef __GNUC__
++void StacktraceArm64DummyFunction() __attribute__((noinline));
++void StacktraceArm64DummyFunction() { __asm__ volatile(""); }
++#else
++# error StacktraceArm64DummyFunction() needs to be ported to this platform.
++#endif
++#endif  // BASE_STACKTRACE_ARM64_INL_H_
++
++// Note: this part of the file is included several times.
++// Do not put globals below.
++
++// The following 4 functions are generated from the code below:
++//   GetStack{Trace,Frames}()
++//   GetStack{Trace,Frames}WithContext()
++//
++// These functions take the following args:
++//   void** result: the stack-trace, as an array
++//   int* sizes: the size of each stack frame, as an array
++//               (GetStackFrames* only)
++//   int max_depth: the size of the result (and sizes) array(s)
++//   int skip_count: how many stack pointers to skip before storing in result
++//   void* ucp: a ucontext_t* (GetStack{Trace,Frames}WithContext only)
++static int GET_STACK_TRACE_OR_FRAMES {
++#ifdef __GNUC__
++  void **sp = reinterpret_cast<void**>(__builtin_frame_address(0));
++#else
++# error reading stack point not yet supported on this platform.
++#endif
++
++  // On AArch64, the return address is stored in X30.
++  // This is not saved on the stack frame of a leaf function.  To
++  // simplify code that reads return addresses, we call a dummy
++  // function so that the return address of this function is also
++  // stored in the stack frame.  This works at least for gcc.
++  StacktraceArm64DummyFunction();
++
++  skip_count++; // skip parent frame due to indirection in stacktrace.cc
++
++  int n = 0;
++  while (sp && n < max_depth) {
++    // The GetStackFrames routine is called when we are in some
++    // informational context (the failure signal handler for example).
++    // Use the non-strict unwinding rules to produce a stack trace
++    // that is as complete as possible (even if it contains a few bogus
++    // entries in some rare cases).
++    void **next_sp = NextStackFrame<IS_STACK_FRAMES == 0>(sp);
++
++    if (skip_count > 0) {
++      skip_count--;
++    } else {
++      result[n] = *sp;
++
++#if IS_STACK_FRAMES
++      if (next_sp > sp) {
++        sizes[n] = (uintptr_t)next_sp - (uintptr_t)sp;
++      } else {
++        // A frame-size of 0 is used to indicate unknown frame size.
++        sizes[n] = 0;
++      }
++#endif
++      n++;
++    }
++    sp = next_sp;
++  }
++  return n;
++}
--- google-perftools-2.4.orig/debian/patches/gperftools-arm-has-futex.patch
+++ google-perftools-2.4/debian/patches/gperftools-arm-has-futex.patch
@@ -0,0 +1,66 @@
+diff -ru gperftools-2.4/src/base/linux_syscall_support.h gperftools-2.4-fixed/src/base/linux_syscall_support.h
+--- gperftools-2.4/src/base/linux_syscall_support.h	2014-12-06 23:51:40.000000000 +0100
++++ gperftools-2.4-fixed/src/base/linux_syscall_support.h	2015-06-01 16:51:03.725616215 +0200
+@@ -83,7 +83,6 @@
+  *      sys_fcntl(
+  *      sys_fstat(
+  *      sys_futex(
+- *      sys_futex1(
+  *      sys_getcpu(
+  *      sys_getdents64(
+  *      sys_getppid(
+@@ -2094,9 +2093,11 @@
+                        int,            c, long,   a)
+   LSS_INLINE _syscall2(int,     fstat,           int,         f,
+                       struct kernel_stat*,   b)
+-  LSS_INLINE _syscall4(int,     futex,           int*,        a,
++  LSS_INLINE _syscall6(int,     futex,           int*,        a,
+                        int,            o, int,    v,
+-                      struct kernel_timespec*, t)
++                      struct kernel_timespec*, t,
++                       int*, a2,
++                       int, v3)
+ #ifdef __NR_getdents64
+     LSS_INLINE _syscall3(int,     getdents64,      int,         f,
+                          struct kernel_dirent64*, d, int,    c)
+diff -ru gperftools-2.4/src/base/spinlock_linux-inl.h gperftools-2.4-fixed/src/base/spinlock_linux-inl.h
+--- gperftools-2.4/src/base/spinlock_linux-inl.h	2014-12-06 23:51:40.000000000 +0100
++++ gperftools-2.4-fixed/src/base/spinlock_linux-inl.h	2015-06-01 16:51:03.725616215 +0200
+@@ -51,15 +51,10 @@
+     int x = 0;
+     // futexes are ints, so we can use them only when
+     // that's the same size as the lockword_ in SpinLock.
+-#ifdef __arm__
+-    // ARM linux doesn't support sys_futex1(void*, int, int, struct timespec*);
+-    have_futex = 0;
+-#else
+     have_futex = (sizeof (Atomic32) == sizeof (int) &&
+-                  sys_futex(&x, FUTEX_WAKE, 1, 0) >= 0);
+-#endif
++                  sys_futex(&x, FUTEX_WAKE, 1, NULL, NULL, 0) >= 0);
+     if (have_futex &&
+-        sys_futex(&x, FUTEX_WAKE | futex_private_flag, 1, 0) < 0) {
++        sys_futex(&x, FUTEX_WAKE | futex_private_flag, 1, NULL, NULL, 0) < 0) {
+       futex_private_flag = 0;
+     }
+   }
+@@ -85,7 +85,8 @@
+       tm.tv_nsec *= 16;  // increase the delay; we expect explicit wakeups
+       sys_futex(reinterpret_cast<int *>(const_cast<Atomic32 *>(w)),
+                 FUTEX_WAIT | futex_private_flag,
+-                value, reinterpret_cast<struct kernel_timespec *>(&tm));
++                value, reinterpret_cast<struct kernel_timespec *>(&tm),
++                NULL, 0);
+     } else {
+       nanosleep(&tm, NULL);
+     }
+@@ -96,7 +97,8 @@
+ void SpinLockWake(volatile Atomic32 *w, bool all) {
+   if (have_futex) {
+     sys_futex(reinterpret_cast<int *>(const_cast<Atomic32 *>(w)),
+-              FUTEX_WAKE | futex_private_flag, all? INT_MAX : 1, 0);
++              FUTEX_WAKE | futex_private_flag, all? INT_MAX : 1,
++              NULL, NULL, 0);
+   }
+ }
+ 
--- google-perftools-2.4.orig/debian/rules
+++ google-perftools-2.4/debian/rules
@@ -0,0 +1,76 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+# This file was originally written by Joey Hess and Craig Small.
+# As a special exception, when this file is copied by dh-make into a
+# dh-make output file, you may use that output file without restriction.
+# This special exception was added by Craig Small in version 0.37 of dh-make.
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+include /usr/share/cdbs/1/rules/debhelper.mk
+include /usr/share/cdbs/1/class/autotools.mk
+include /usr/share/cdbs/1/rules/simple-patchsys.mk
+
+DEB_AUTO_UPDATE_AUTOCONF = 2.61
+DEB_AUTO_UPDATE_AUTOMAKE = 1.11
+DEB_AUTO_UPDATE_ACLOCAL = $(DEB_AUTO_UPDATE_AUTOMAKE)
+DEB_AUTO_UPDATE_LIBTOOL = pre
+DEB_INSTALL_CHANGELOGS_ALL := ChangeLog
+
+ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS)))
+# List of architectures for which test execution is enabled
+TEST_ARCHS=i386 amd64 powerpc ppc64el
+TEST_ARCHS=
+ifneq (,$(findstring $(DEB_HOST_ARCH), $(TEST_ARCHS)))
+DEB_MAKE_CHECK_TARGET := check
+endif # TEST_ARCHS
+endif # nocheck
+
+lib_dir = usr/lib
+bin_dir = usr/bin
+man_dir = usr/share/man/man1
+
+DEB_INSTALL_DIRS_libtcmalloc-minimal4 += $(lib_dir)
+
+DEB_INSTALL_DIRS_libgoogle-perftools4 += $(lib_dir)
+DEB_INSTALL_DOCS_libgoogle-perftools4 += debian/README.Debian
+
+DEB_INSTALL_DIRS_libgoogle-perftools-dev += $(lib_dir) usr/include/google usr/include/gperftools
+DEB_INSTALL_DOCS_libgoogle-perftools-dev += $(DEB_SRCDIR)/doc/* -Xpprof.1
+
+DEB_INSTALL_DIRS_google-perftools += $(bin_dir) $(man_dir)
+DEB_INSTALL_MANPAGES_google-perftools += debian/tmp/$(man_dir)/google-pprof.1
+
+pre-build::
+	chmod u+w -R $(CURDIR)
+
+install/libtcmalloc-minimal4::
+	(cd $(CURDIR)/debian/tmp && \
+	    find usr/lib -name 'libtcmalloc_minimal.so.*' -o \
+	                 -name 'libtcmalloc_minimal_debug.so.*') | \
+	    xargs dh_movefiles -p$(cdbs_curpkg)
+
+install/libgoogle-perftools4::
+	(cd $(CURDIR)/debian/tmp && \
+	    find usr/lib -name 'libprofiler.so.*' -o \
+	                 -name 'libtcmalloc.so.*' -o \
+	                 -name 'libtcmalloc_debug.so.*' -o \
+			 -name 'libtcmalloc_and_profiler.so.*') | \
+	    xargs dh_movefiles -p$(cdbs_curpkg)
+
+install/libgoogle-perftools-dev::
+	(cd $(CURDIR)/debian/tmp && \
+	    find usr/lib -name '*.a' -o -name '*.so') | \
+	    xargs dh_movefiles -p$(cdbs_curpkg)
+	dh_movefiles -p$(cdbs_curpkg) usr/include/google
+	dh_movefiles -p$(cdbs_curpkg) usr/include/gperftools
+
+install/google-perftools::
+	(cd $(CURDIR)/debian/tmp/usr/bin && \
+	  mv pprof google-pprof)
+	dh_movefiles -p$(cdbs_curpkg) usr/bin/google-pprof
+	(cd $(CURDIR)/debian/tmp/usr/share/man/man1 && \
+	  mv pprof.1 google-pprof.1 && \
+	sed -i -e "s/pprof/google-pprof/g" google-pprof.1)
--- google-perftools-2.4.orig/debian/watch
+++ google-perftools-2.4/debian/watch
@@ -0,0 +1,2 @@
+version=3
+https://code.google.com/p/gperftools/ https://.*/gperftools-(\d[\d\.]*)\.tar\.gz
