Bug 1348776 - Part 1: Fix a crash in the profiler when MOZ_PROFILING is undefined. r=mstange, a=gchang
authorNicholas Nethercote <nnethercote@mozilla.com>
Mon, 27 Mar 2017 16:49:41 +1100
changeset 375753 b95fcbceb5b39ade0054b2fd114c19bc2ed91ef8
parent 375752 ed35e2ec29bc782d219a2833f565f7c976f4022b
child 375754 08002a9d9e3ae337bdd23bf01432ba64251b880e
push id11020
push userryanvm@gmail.com
push dateWed, 05 Apr 2017 21:31:14 +0000
treeherdermozilla-aurora@b95fcbceb5b3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmstange, gchang
bugs1348776
milestone54.0a2
Bug 1348776 - Part 1: Fix a crash in the profiler when MOZ_PROFILING is undefined. r=mstange, a=gchang
tools/profiler/core/platform.cpp
--- a/tools/profiler/core/platform.cpp
+++ b/tools/profiler/core/platform.cpp
@@ -2436,17 +2436,17 @@ profiler_get_backtrace()
   ThreadInfo* threadInfo =
     new ThreadInfo("SyncProfile", tid, NS_IsMainThread(), stack,
                    /* stackTop */ nullptr);
   threadInfo->SetHasProfile();
 
   TickSample sample;
   sample.threadInfo = threadInfo;
 
-#if defined(HAVE_NATIVE_UNWIND)
+#if defined(HAVE_NATIVE_UNWIND) || defined(USE_LUL_STACKWALK)
 #if defined(GP_OS_windows) || defined(GP_OS_linux) || defined(GP_OS_android)
   tickcontext_t context;
   sample.PopulateContext(&context);
 #elif defined(GP_OS_darwin)
   sample.PopulateContext(nullptr);
 #else
 # error "unknown platform"
 #endif