Bug 718026 - Only walk the stack on profiling builds; r=jrmuizel
authorEhsan Akhgari <ehsan@mozilla.com>
Tue, 17 Jan 2012 11:49:05 -0500
changeset 85898 39296dfa2ac689c5d5dc10588e788aa6cc5a9d34
parent 85897 419f8a0f6374c6f69a00577d8b6670883e254a83
child 85899 4a79fefefa28fdb09001ac809ad37b17ada51477
push id805
push userakeybl@mozilla.com
push dateWed, 01 Feb 2012 18:17:35 +0000
treeherdermozilla-aurora@6fb3bf232436 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjrmuizel
bugs718026
milestone12.0a1
Bug 718026 - Only walk the stack on profiling builds; r=jrmuizel
tools/profiler/sps/TableTicker.cpp
--- a/tools/profiler/sps/TableTicker.cpp
+++ b/tools/profiler/sps/TableTicker.cpp
@@ -42,26 +42,26 @@
 #include "platform.h"
 #include "nsXULAppAPI.h"
 #include "nsThreadUtils.h"
 #include "prenv.h"
 #include "shared-libraries.h"
 #include "mozilla/StringBuilder.h"
 
 // we eventually want to make this runtime switchable
-#if defined(XP_MACOSX) || defined(XP_UNIX)
+#if defined(MOZ_PROFILING) && (defined(XP_MACOSX) || defined(XP_UNIX))
  #ifndef ANDROID
   #define USE_BACKTRACE
  #endif
 #endif
 #ifdef USE_BACKTRACE
  #include <execinfo.h>
 #endif
 
-#ifdef XP_WIN
+#if defined(MOZ_PROFILING) && defined(XP_WIN)
  #define USE_NS_STACKWALK
 #endif
 #ifdef USE_NS_STACKWALK
  #include "nsStackWalk.h"
 #endif
 
 using std::string;
 using namespace mozilla;