зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1462784 - Annotate idle stacks in the chromium event loop. r=froydnj
MozReview-Commit-ID: Ac8H02GKnmV --HG-- extra : rebase_source : 3bbf0398b2a2152a9000d51f04688436832f81e1
This commit is contained in:
Родитель
4e14f33065
Коммит
2eecff51ad
|
@ -21,6 +21,8 @@ MessagePumpDefault::MessagePumpDefault()
|
|||
}
|
||||
|
||||
void MessagePumpDefault::Run(Delegate* delegate) {
|
||||
AUTO_PROFILER_LABEL("MessagePumpDefault::Run", OTHER);
|
||||
|
||||
DCHECK(keep_running_) << "Quit must have been called outside of Run!";
|
||||
|
||||
const MessageLoop* const loop = MessageLoop::current();
|
||||
|
@ -55,7 +57,7 @@ void MessagePumpDefault::Run(Delegate* delegate) {
|
|||
|
||||
if (delayed_work_time_.is_null()) {
|
||||
hangMonitor.NotifyWait();
|
||||
AUTO_PROFILER_LABEL("MessagePumpDefault::Run:Wait", OTHER);
|
||||
AUTO_PROFILER_LABEL("MessagePumpDefault::Run:Wait", IDLE);
|
||||
{
|
||||
AUTO_PROFILER_THREAD_SLEEP;
|
||||
event_.Wait();
|
||||
|
@ -64,7 +66,7 @@ void MessagePumpDefault::Run(Delegate* delegate) {
|
|||
TimeDelta delay = delayed_work_time_ - TimeTicks::Now();
|
||||
if (delay > TimeDelta()) {
|
||||
hangMonitor.NotifyWait();
|
||||
AUTO_PROFILER_LABEL("MessagePumpDefault::Run:Wait", OTHER);
|
||||
AUTO_PROFILER_LABEL("MessagePumpDefault::Run:Wait", IDLE);
|
||||
{
|
||||
AUTO_PROFILER_THREAD_SLEEP;
|
||||
event_.TimedWait(delay);
|
||||
|
|
Загрузка…
Ссылка в новой задаче