зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1503468 - Add more AUTO_PROFILER_THREAD_SLEEP's - r=mstange
These are around wait functions that already had an IDLE marker. Differential Revision: https://phabricator.services.mozilla.com/D10671 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
585a48472a
Коммит
1d2a9c227e
|
@ -569,6 +569,7 @@ StorageDBThread::ThreadFunc()
|
|||
}
|
||||
} else if (MOZ_UNLIKELY(!mStopIOThread)) {
|
||||
AUTO_PROFILER_LABEL("StorageDBThread::ThreadFunc::Wait", IDLE);
|
||||
AUTO_PROFILER_THREAD_SLEEP;
|
||||
lockMonitor.Wait(timeUntilFlush);
|
||||
}
|
||||
} // thread loop
|
||||
|
|
|
@ -3832,6 +3832,8 @@ WorkerPrivate::WaitForWorkerEvents()
|
|||
AssertIsOnWorkerThread();
|
||||
mMutex.AssertCurrentThreadOwns();
|
||||
|
||||
AUTO_PROFILER_THREAD_SLEEP;
|
||||
|
||||
// Wait for a worker event.
|
||||
mCondVar.Wait();
|
||||
}
|
||||
|
|
|
@ -261,6 +261,8 @@ void MessagePumpForUI::WaitForWork() {
|
|||
if (delay < 0) // Negative value means no timers waiting.
|
||||
delay = INFINITE;
|
||||
|
||||
AUTO_PROFILER_THREAD_SLEEP;
|
||||
|
||||
mozilla::widget::WinUtils::WaitForMessage(delay);
|
||||
}
|
||||
|
||||
|
|
|
@ -749,6 +749,7 @@ nsAppShell::ProcessNextNativeEvent(bool mayWait)
|
|||
IDLE);
|
||||
mozilla::BackgroundHangMonitor().NotifyWait();
|
||||
|
||||
AUTO_PROFILER_THREAD_SLEEP;
|
||||
curEvent = mEventQueue.Pop(/* mayWait */ true);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -293,6 +293,7 @@ SchedulerEventQueue::GetEvent(bool aMayWait,
|
|||
CooperativeThreadPool::Yield(mScheduler->GetQueueResource(), lock);
|
||||
} else {
|
||||
AUTO_PROFILER_LABEL("SchedulerEventQueue::GetEvent::Wait", IDLE);
|
||||
AUTO_PROFILER_THREAD_SLEEP;
|
||||
mNonCooperativeCondVar.Wait();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -161,6 +161,7 @@ ThreadEventQueue<InnerQueueT>::GetEvent(bool aMayWait,
|
|||
}
|
||||
|
||||
AUTO_PROFILER_LABEL("ThreadEventQueue::GetEvent::Wait", IDLE);
|
||||
AUTO_PROFILER_THREAD_SLEEP;
|
||||
mEventsAvailable.Wait();
|
||||
}
|
||||
|
||||
|
|
|
@ -224,7 +224,10 @@ nsThreadPool::Run()
|
|||
TimeDuration delta = timeout - (now - idleSince);
|
||||
LOG(("THRD-P(%p) %s waiting [%f]\n", this, mName.BeginReading(),
|
||||
delta.ToMilliseconds()));
|
||||
mEventsAvailable.Wait(delta);
|
||||
{
|
||||
AUTO_PROFILER_THREAD_SLEEP;
|
||||
mEventsAvailable.Wait(delta);
|
||||
}
|
||||
LOG(("THRD-P(%p) done waiting\n", this));
|
||||
}
|
||||
} else if (wasIdle) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче