Bug 1322758 - Stop decrementing ProfileGatherer counter when receiving an exit profile. r=mstange
authorMike Conley <mconley@mozilla.com>
Fri, 09 Dec 2016 18:05:45 -0500
changeset 373507 dc7e50632df14bad20cd11b2c1bedab587676ed5
parent 373506 383136208ab07ab9de94f8fd8c5bd6ed0f41aacf
child 373508 00a8b8e0ca9e90071700023835683ff490ee1f7b
push id1419
push userjlund@mozilla.com
push dateMon, 10 Apr 2017 20:44:07 +0000
treeherdermozilla-release@5e6801b73ef6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmstange
bugs1322758
milestone53.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 1322758 - Stop decrementing ProfileGatherer counter when receiving an exit profile. r=mstange For some reason, we were decrementing the ProfileGatherer's mPendingProfiles when receiving an "exit profile". An exit profile is handed over by a subprocess parent actor, but in order to have that exit profile, the content process _must_ have sent it up to the parent already, and that means that the counter had alreay been decremented on its receipt. This means that if the subprocess parent actor exited, it'd decrement the counter twice, which means that we open ourselves up for missing out on profiles that haven't yet reached the parent. I can't think of a good reason why we'd want to decrement the counter when storing an exit profile, so I've just removed that bit. MozReview-Commit-ID: 8jSqtpYbXh0
tools/profiler/gecko/ProfileGatherer.cpp
--- a/tools/profiler/gecko/ProfileGatherer.cpp
+++ b/tools/profiler/gecko/ProfileGatherer.cpp
@@ -230,22 +230,16 @@ ProfileGatherer::Cancel()
 
 void
 ProfileGatherer::OOPExitProfile(const nsCString& aProfile)
 {
   if (mExitProfiles.Length() >= MAX_SUBPROCESS_EXIT_PROFILES) {
     mExitProfiles.RemoveElementAt(0);
   }
   mExitProfiles.AppendElement(aProfile);
-
-  // If a process exited while gathering, we need to make
-  // sure we decrement the counter.
-  if (mGathering) {
-    GatheredOOPProfile();
-  }
 }
 
 NS_IMETHODIMP
 ProfileGatherer::Observe(nsISupports* aSubject,
                          const char* aTopic,
                          const char16_t *someData)
 {
   if (!strcmp(aTopic, "profiler-subprocess")) {