Bug 1446161 - Remove CONTENT_PROCESS_LAUNCH_TIME_MS telemetry. r=mconley,chutten
authorJed Davis <jld@mozilla.com>
Wed, 28 Nov 2018 20:42:17 +0000
changeset 448601 25b4fcd4382dfa21ee08f1b7604c649132f52500
parent 448600 1b92017b48651531b42b12856acf0f36001168ae
child 448602 3cbd2cf23c867eddeaeccdfffc70485f2ad3c9c0
push id73935
push userjedavis@mozilla.com
push dateWed, 28 Nov 2018 22:42:38 +0000
treeherderautoland@41195aed7eef [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmconley, chutten
bugs1446161, 1474991
milestone65.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 1446161 - Remove CONTENT_PROCESS_LAUNCH_TIME_MS telemetry. r=mconley,chutten The CONTENT_PROCESS_LAUNCH_TIME_MS histogram is currently gathering times from two different spans of the launch process and mixing them together; it's at best a rough approximation of "launch time". In addition, with async launch we'll want to gather different metrics than for sync launch (see comments on bug 1474991). So I'm removing this histogram and will replace it with separate sync and async metrics in bug 1474991; I intend to land both bugs' patches at or near the same time, so we won't have a gap in getting some kind of data. Depends on D8940 Differential Revision: https://phabricator.services.mozilla.com/D8941
dom/ipc/ContentParent.cpp
toolkit/components/telemetry/Histograms.json
--- a/dom/ipc/ContentParent.cpp
+++ b/dom/ipc/ContentParent.cpp
@@ -2349,32 +2349,27 @@ ContentParent::LaunchSubprocess(ProcessP
 
   ContentProcessManager::GetSingleton()->AddContentProcess(this);
 
   mHangMonitorActor = ProcessHangMonitor::AddProcess(this);
 
   // Set a reply timeout for CPOWs.
   SetReplyTimeoutMs(Preferences::GetInt("dom.ipc.cpow.timeout", 0));
 
-  // TODO: In ASYNC_CONTENTPROC_LAUNCH, if OtherPid() is not called between
-  // mSubprocess->Launch() and this, then we're not really measuring how long it
-  // took to spawn the process.
-  Telemetry::Accumulate(Telemetry::CONTENT_PROCESS_LAUNCH_TIME_MS,
-                        static_cast<uint32_t>((TimeStamp::Now() - mLaunchTS)
-                                              .ToMilliseconds()));
-
   nsCOMPtr<nsIObserverService> obs = mozilla::services::GetObserverService();
   if (obs) {
     nsAutoString cpId;
     cpId.AppendInt(static_cast<uint64_t>(this->ChildID()));
     obs->NotifyObservers(static_cast<nsIObserver*>(this), "ipc:content-initializing", cpId.get());
   }
 
   Init();
 
+  // Launch time telemetry will return in a later patch (bug 1474991).
+
   return true;
 }
 
 ContentParent::ContentParent(ContentParent* aOpener,
                              const nsAString& aRemoteType,
                              RecordReplayState aRecordReplayState,
                              const nsAString& aRecordingFile,
                              int32_t aJSPluginID)
@@ -2464,20 +2459,16 @@ ContentParent::~ContentParent()
   if (mSubprocess) {
     DelayedDeleteSubprocess(mSubprocess);
   }
 }
 
 void
 ContentParent::InitInternal(ProcessPriority aInitialPriority)
 {
-  Telemetry::Accumulate(Telemetry::CONTENT_PROCESS_LAUNCH_TIME_MS,
-                        static_cast<uint32_t>((TimeStamp::Now() - mLaunchTS)
-                                              .ToMilliseconds()));
-
   XPCOMInitData xpcomInit;
 
   nsCOMPtr<nsIIOService> io(do_GetIOService());
   MOZ_ASSERT(io, "No IO service?");
   DebugOnly<nsresult> rv = io->GetOffline(&xpcomInit.isOffline());
   MOZ_ASSERT(NS_SUCCEEDED(rv), "Failed getting offline?");
 
   rv = io->GetConnectivity(&xpcomInit.isConnected());
--- a/toolkit/components/telemetry/Histograms.json
+++ b/toolkit/components/telemetry/Histograms.json
@@ -290,27 +290,16 @@
     "record_in_processes": ["main", "content", "gpu"],
     "alert_emails": ["gfx-telemetry-alerts@mozilla.com", "rhunt@mozilla.com"],
     "expires_in_version": "never",
     "description": "Time from vsync to finishing a composite in milliseconds.",
     "kind": "exponential",
     "high": 1000,
     "n_buckets": 50
   },
-  "CONTENT_PROCESS_LAUNCH_TIME_MS" : {
-    "record_in_processes": ["main", "content"],
-    "alert_emails": ["fgomes@mozilla.com", "mconley@mozilla.com"],
-    "expires_in_version": "67",
-    "bug_numbers": [1304790],
-    "kind": "exponential",
-    "high": 64000,
-    "n_buckets": 100,
-    "releaseChannelCollection": "opt-out",
-    "description": "Content process launch time until the GetXPCOMProcessAttributes message is received, in milliseconds"
-  },
   "CONTENT_RESPONSE_DURATION" : {
     "record_in_processes": ["main", "content", "gpu"],
     "alert_emails": ["gfx-telemetry-alerts@mozilla.com", "kgupta@mozilla.com"],
     "bug_numbers": [1261373],
     "expires_in_version": "70",
     "description": "Main thread response times for APZ notifications about input events (ms)",
     "kind" : "exponential",
     "high": 60000,