Bug 1205074 - Enable EHABI stack walking on Android r=BenWa
authorJames Willcox <snorp@snorp.net>
Tue, 15 Sep 2015 17:20:52 -0500
changeset 295468 7508686dc981cd072b73ae182f71c233aff94863
parent 295467 91040fc155c4b7c8226a62e9761efe4360fa3857
child 295469 adac35e4feeb83a99a4476df70bb16766f4ab203
push id5245
push userraliiev@mozilla.com
push dateThu, 29 Oct 2015 11:30:51 +0000
treeherdermozilla-beta@dac831dc1bd0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersBenWa
bugs1205074
milestone43.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1205074 - Enable EHABI stack walking on Android r=BenWa
tools/profiler/core/GeckoSampler.cpp
tools/profiler/core/platform-linux.cc
tools/profiler/core/platform.h
--- a/tools/profiler/core/GeckoSampler.cpp
+++ b/tools/profiler/core/GeckoSampler.cpp
@@ -65,18 +65,18 @@ typedef CONTEXT tickcontext_t;
 typedef ucontext_t tickcontext_t;
 #endif
 
 #if defined(LINUX) || defined(XP_MACOSX)
 #include <sys/types.h>
 pid_t gettid();
 #endif
 
-#if defined(SPS_ARCH_arm) && defined(MOZ_WIDGET_GONK)
- // Should also work on other Android and ARM Linux, but not tested there yet.
+#if defined(__arm__) && defined(ANDROID)
+ // Should also work on ARM Linux, but not tested there yet.
  #define USE_EHABI_STACKWALK
 #endif
 #ifdef USE_EHABI_STACKWALK
  #include "EHABIStackWalk.h"
 #endif
 
 #ifndef SPS_STANDALONE
 #if defined(SPS_PLAT_amd64_linux) || defined(SPS_PLAT_x86_linux)
--- a/tools/profiler/core/platform-linux.cc
+++ b/tools/profiler/core/platform-linux.cc
@@ -71,17 +71,17 @@
 #include "mozilla/LinuxSignal.h"
 #include "mozilla/TimeStamp.h"
 #include "mozilla/DebugOnly.h"
 #include "ProfileEntry.h"
 #include "nsThreadUtils.h"
 #include "GeckoSampler.h"
 #include "ThreadResponsiveness.h"
 
-#if defined(__ARM_EABI__) && defined(MOZ_WIDGET_GONK)
+#if defined(__ARM_EABI__) && defined(ANDROID)
  // Should also work on other Android and ARM Linux, but not tested there yet.
 # define USE_EHABI_STACKWALK
 # include "EHABIStackWalk.h"
 #elif defined(SPS_PLAT_amd64_linux) || defined(SPS_PLAT_x86_linux)
 # define USE_LUL_STACKWALK
 # include "lul/LulMain.h"
 # include "lul/platform-linux-lul.h"
 #endif
--- a/tools/profiler/core/platform.h
+++ b/tools/profiler/core/platform.h
@@ -238,16 +238,17 @@ class Thread {
 // backtraces are available only on selected platforms.  Breakpad is
 // the only supported native unwinder.  HAVE_NATIVE_UNWIND is set at
 // build time to indicate whether native unwinding is possible on this
 // platform.
 
 #undef HAVE_NATIVE_UNWIND
 #if defined(MOZ_PROFILING) \
     && (defined(SPS_PLAT_amd64_linux) || defined(SPS_PLAT_arm_android) \
+        || (defined(MOZ_WIDGET_ANDROID) && defined(__arm__)) \
         || defined(SPS_PLAT_x86_linux) \
         || defined(SPS_OS_windows) \
         || defined(SPS_OS_darwin))
 # define HAVE_NATIVE_UNWIND
 #endif
 
 /* Some values extracted at startup from environment variables, that
    control the behaviour of the breakpad unwinder. */