Bug 1462784 - Annotate idle stacks in the native event loop on Windows. r?froydnj draft
authorMarkus Stange <mstange@themasta.com>
Fri, 18 May 2018 18:59:05 -0400
changeset 803070 5ea1be35e1849f82c84003d11fde9d1fc18040ea
parent 803069 250e414943defae2578ff532a35bb5e5a42faa8b
child 803071 607bf1947567d32e8d74f376a5e960f83cb71ae3
push id112022
push userbmo:mstange@themasta.com
push dateFri, 01 Jun 2018 21:00:49 +0000
reviewersfroydnj
bugs1462784
milestone62.0a1
Bug 1462784 - Annotate idle stacks in the native event loop on Windows. r?froydnj MozReview-Commit-ID: A0c3ZLLkLUC
widget/windows/nsAppShell.cpp
--- a/widget/windows/nsAppShell.cpp
+++ b/widget/windows/nsAppShell.cpp
@@ -535,16 +535,17 @@ nsAppShell::ProcessNextNativeEvent(bool 
 
         ::TranslateMessage(&msg);
         ::DispatchMessageW(&msg);
       }
     } else if (mayWait) {
       // Block and wait for any posted application message
       mozilla::HangMonitor::Suspend();
       {
+        AUTO_PROFILER_LABEL("nsAppShell::ProcessNextNativeEvent::Wait", IDLE);
         AUTO_PROFILER_THREAD_SLEEP;
         WinUtils::WaitForMessage();
       }
     }
   } while (!gotMessage && mayWait);
 
   // See DoProcessNextNativeEvent, mEventloopNestingLevel will be
   // one when a modal loop unwinds.