Bug 887826 - Disable multi-threaded profiling on b2g to reduce memory usage. r=jseward
authorBenoit Girard <b56girard@gmail.com>
Tue, 16 Jul 2013 09:56:43 -0400
changeset 138678 cb30c2681fe3425efa7321f65cf167f81eb47f62
parent 138677 7b22f26c1e2cdcebff0df6c138497fe7ae427ce4
child 138679 b5ebb29f3ae2b04affcf522185bbcbc101acede7
push id24964
push userryanvm@gmail.com
push dateTue, 16 Jul 2013 20:04:09 +0000
treeherderautoland@fd10ead17ace [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjseward
bugs887826
milestone25.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 887826 - Disable multi-threaded profiling on b2g to reduce memory usage. r=jseward
tools/profiler/platform.cpp
--- a/tools/profiler/platform.cpp
+++ b/tools/profiler/platform.cpp
@@ -582,33 +582,39 @@ void mozilla_sampler_unlock()
 {
   nsCOMPtr<nsIObserverService> os = mozilla::services::GetObserverService();
   if (os)
     os->NotifyObservers(nullptr, "profiler-unlocked", nullptr);
 }
 
 bool mozilla_sampler_register_thread(const char* aName, void* stackTop)
 {
+#ifndef MOZ_WIDGET_GONK
   PseudoStack* stack = new PseudoStack();
   tlsPseudoStack.set(stack);
 
   return Sampler::RegisterCurrentThread(aName, stack, false, stackTop);
+#else
+  return false;
+#endif
 }
 
 void mozilla_sampler_unregister_thread()
 {
+#ifndef MOZ_WIDGET_GONK
   Sampler::UnregisterCurrentThread();
 
   PseudoStack *stack = tlsPseudoStack.get();
   if (!stack) {
     ASSERT(false);
     return;
   }
   delete stack;
   tlsPseudoStack.set(nullptr);
+#endif
 }
 
 double mozilla_sampler_time()
 {
   if (!mozilla_sampler_is_active()) {
     return 0.0;
   }
   TimeDuration delta = TimeStamp::Now() - sStartTime;