Bug 1462784 - Annotate idle stacks in nsThreadPool. r=froydnj
☠☠ backed out by e8eba439b33e ☠ ☠
authorMarkus Stange <mstange@themasta.com>
Thu, 24 May 2018 08:58:44 -0400
changeset 420803 cde492240e99633174638117aeb092a6e025fd48
parent 420802 8c8d30fa406cc5cd9ee42289ca8779f525c71770
child 420804 c8192175f3601a780affbacdb41fa1a8ef71fe50
push id103894
push usercsabou@mozilla.com
push dateFri, 01 Jun 2018 09:46:36 +0000
treeherdermozilla-inbound@e99ff79303ea [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs1462784
milestone62.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 1462784 - Annotate idle stacks in nsThreadPool. r=froydnj MozReview-Commit-ID: GtHBHQiXpf3
xpcom/threads/nsThreadPool.cpp
--- a/xpcom/threads/nsThreadPool.cpp
+++ b/xpcom/threads/nsThreadPool.cpp
@@ -208,16 +208,18 @@ nsThreadPool::Run()
         }
 
         if (exitThread) {
           if (wasIdle) {
             --mIdleCount;
           }
           shutdownThreadOnExit = mThreads.RemoveObject(current);
         } else {
+          AUTO_PROFILER_LABEL("nsThreadPool::Run::Wait", IDLE);
+
           TimeDuration delta = timeout - (now - idleSince);
           LOG(("THRD-P(%p) %s waiting [%f]\n", this, mName.BeginReading(),
                delta.ToMilliseconds()));
           mEventsAvailable.Wait(delta);
           LOG(("THRD-P(%p) done waiting\n", this));
         }
       } else if (wasIdle) {
         wasIdle = false;