Bug 1666975 - Remove PENDING_CRITICAL_INPUT_WHEN_TIMEOUT telemetry probe r=smaug
authorSean Feng <sefeng@mozilla.com>
Fri, 25 Sep 2020 20:57:51 +0000
changeset 550466 9a2ce795a69e68de482e8a78ae11821505ca808d
parent 550465 87b21df819bd914fc13fb204c376830f364b83fc
child 550467 683cb2775d4a113e899c90dfafa3294d825cd10d
push id127297
push usersefeng@mozilla.com
push dateFri, 25 Sep 2020 21:04:32 +0000
treeherderautoland@9a2ce795a69e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs1666975
milestone83.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 1666975 - Remove PENDING_CRITICAL_INPUT_WHEN_TIMEOUT telemetry probe r=smaug This probe is no longer needed. Differential Revision: https://phabricator.services.mozilla.com/D91456
dom/base/TimeoutManager.cpp
dom/base/TimeoutManager.h
toolkit/components/telemetry/Histograms.json
--- a/dom/base/TimeoutManager.cpp
+++ b/dom/base/TimeoutManager.cpp
@@ -395,37 +395,16 @@ void TimeoutManager::UpdateBudget(const 
     // timeouts being executed, even though budget throttling isn't
     // active at the moment.
     mExecutionBudget = GetMaxBudget(isBackground);
   }
 
   mLastBudgetUpdate = aNow;
 }
 
-size_t TimeoutManager::GetNumPendingInputs() {
-  ContentChild* contentChild = ContentChild::GetSingleton();
-  mozilla::ipc::MessageChannel* channel =
-      contentChild ? contentChild->GetIPCChannel() : nullptr;
-
-  if (channel) {
-    size_t count = 0;
-    channel->PeekMessages([&count](const IPC::Message& aMsg) -> bool {
-      if (nsContentUtils::IsMessageCriticalInputEvent(aMsg)) {
-        // The max number we can record in the telemetry is 80,
-        // so we don't need to continue the counting.
-        if (++count > 80) {
-          return false;
-        }
-      }
-      return true;
-    });
-    return count;
-  }
-  return 0;
-}
 // The longest interval (as PRIntervalTime) we permit, or that our
 // timer code can handle, really. See DELAY_INTERVAL_LIMIT in
 // nsTimerImpl.h for details.
 #define DOM_MAX_TIMEOUT_VALUE DELAY_INTERVAL_LIMIT
 
 uint32_t TimeoutManager::sNestingLevel = 0;
 
 TimeoutManager::TimeoutManager(nsGlobalWindowInner& aWindow,
@@ -906,18 +885,16 @@ void TimeoutManager::RunTimeout(const Ti
                    timeout->mIsInterval ? "Interval" : "Timeout", this,
                    timeout.get(), timeout->mFiringId, timeout->mFiringIndex,
                    mFiringIndex));
         }
         MOZ_ASSERT(timeout->mFiringIndex > mLastFiringIndex);
         mLastFiringIndex = timeout->mFiringIndex;
 #endif
         // This timeout is good to run.
-        Telemetry::Accumulate(Telemetry::PENDING_CRITICAL_INPUT_WHEN_TIMEOUT,
-                              GetNumPendingInputs());
         bool timeout_was_cleared = window->RunTimeoutHandler(timeout, scx);
 #if MOZ_GECKO_PROFILER
         if (profiler_can_accept_markers()) {
           TimeDuration elapsed = now - timeout->SubmitTime();
           TimeDuration target = timeout->When() - timeout->SubmitTime();
           TimeDuration delta = now - timeout->When();
           TimeDuration runtime = TimeStamp::Now() - now;
           nsPrintfCString marker(
--- a/dom/base/TimeoutManager.h
+++ b/dom/base/TimeoutManager.h
@@ -98,18 +98,16 @@ class TimeoutManager final {
   nsIEventTarget* EventTarget();
 
   bool BudgetThrottlingEnabled(bool aIsBackground) const;
 
   static const uint32_t InvalidFiringId;
 
   void SetLoading(bool value);
 
-  size_t GetNumPendingInputs();
-
  private:
   void MaybeStartThrottleTimeout();
 
   // Return true if |aTimeout| needs to be reinserted into the timeout list.
   bool RescheduleTimeout(mozilla::dom::Timeout* aTimeout,
                          const TimeStamp& aLastCallbackTime,
                          const TimeStamp& aCurrentNow);
 
--- a/toolkit/components/telemetry/Histograms.json
+++ b/toolkit/components/telemetry/Histograms.json
@@ -1672,27 +1672,16 @@
     "kind": "exponential",
     "releaseChannelCollection": "opt-out",
     "low": 1,
     "high": 20000,
     "n_buckets": 100,
     "description": "Time between receiving a scroll event on the event loop and compositing its result onto the screen (ms)",
     "bug_numbers": [1500465, 1604818]
   },
-  "PENDING_CRITICAL_INPUT_WHEN_TIMEOUT": {
-    "record_in_processes": ["content"],
-    "products": ["firefox"],
-    "alert_emails": ["perfteam@mozilla.com", "seanfeng@mozilla.com"],
-    "expires_in_version": "84",
-    "kind": "enumerated",
-    "n_values": 80,
-    "releaseChannelCollection": "opt-out",
-    "description": "Measures the number of pending critical input events in the IPC channel when the timeout handler is about to run",
-    "bug_numbers": [1648284]
-  },
   "CANVAS_2D_USED": {
     "record_in_processes": ["main", "content"],
     "products": ["firefox", "fennec"],
     "expires_in_version": "never",
     "kind": "boolean",
     "description": "2D canvas used"
   },
   "CANVAS_WEBGL_ACCL_FAILURE_ID": {