Bug 1143249 Assertion failure due to profiler shutting off race. r=shu
authorMason Chang <mchang@mozilla.com>
Fri, 13 Mar 2015 21:14:11 -0400
changeset 233746 2e051c2c7cf7051c424c25923a42ba80a85c1ce8
parent 233745 092e01b0561fde56d6090166b4bf255fb0c817f5
child 233747 2ae4dac8f094bfe53735210db7ca9db134114dea
push id28423
push userphilringnalda@gmail.com
push dateMon, 16 Mar 2015 02:35:36 +0000
treeherdermozilla-central@436686833af0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersshu
bugs1143249
milestone39.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 1143249 Assertion failure due to profiler shutting off race. r=shu
gfx/layers/ipc/CompositorParent.cpp
widget/VsyncDispatcher.cpp
--- a/gfx/layers/ipc/CompositorParent.cpp
+++ b/gfx/layers/ipc/CompositorParent.cpp
@@ -1450,25 +1450,25 @@ CompositorParent::ComputeRenderIntegrity
   return 1.0f;
 }
 
 static void
 InsertVsyncProfilerMarker(TimeStamp aVsyncTimestamp)
 {
 #ifdef MOZ_ENABLE_PROFILER_SPS
   MOZ_ASSERT(CompositorParent::IsInCompositorThread());
-  MOZ_ASSERT(profiler_is_active());
   VsyncPayload* payload = new VsyncPayload(aVsyncTimestamp);
   PROFILER_MARKER_PAYLOAD("VsyncTimestamp", payload);
 #endif
 }
 
 /*static */ void
 CompositorParent::PostInsertVsyncProfilerMarker(TimeStamp aVsyncTimestamp)
 {
+  // Called in the vsync thread
   if (profiler_is_active() && sCompositorThreadHolder) {
     CompositorLoop()->PostTask(FROM_HERE,
       NewRunnableFunction(InsertVsyncProfilerMarker, aVsyncTimestamp));
   }
 }
 
 /* static */ void
 CompositorParent::RequestNotifyLayerTreeReady(uint64_t aLayersId, CompositorUpdateObserver* aObserver)
--- a/widget/VsyncDispatcher.cpp
+++ b/widget/VsyncDispatcher.cpp
@@ -40,19 +40,17 @@ CompositorVsyncDispatcher::~CompositorVs
   MOZ_ASSERT(NS_IsMainThread());
 }
 
 void
 CompositorVsyncDispatcher::NotifyVsync(TimeStamp aVsyncTimestamp)
 {
   // In vsync thread
 #ifdef MOZ_ENABLE_PROFILER_SPS
-    if (profiler_is_active()) {
-        layers::CompositorParent::PostInsertVsyncProfilerMarker(aVsyncTimestamp);
-    }
+  layers::CompositorParent::PostInsertVsyncProfilerMarker(aVsyncTimestamp);
 #endif
 
   MutexAutoLock lock(mCompositorObserverLock);
   if (mCompositorVsyncObserver) {
     mCompositorVsyncObserver->NotifyVsync(aVsyncTimestamp);
   }
 }