Bug 1070755: Add telemetry for timing PluginAsyncSurrogate::WaitForInit; r=vladan
☠☠ backed out by 76d1641cf90b ☠ ☠
authorAaron Klotz <aklotz@mozilla.com>
Wed, 24 Dec 2014 17:57:59 -0700
changeset 221317 076d1d47d6019a023c6b79fd0c5dea190e374cbf
parent 221316 43819af59ca585003d595966ce48b80855e4bbef
child 221318 76d1641cf90bfa580bd04864f09c3a086bcf59f2
push id53316
push useraklotz@mozilla.com
push dateThu, 25 Dec 2014 01:00:32 +0000
treeherdermozilla-inbound@076d1d47d601 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersvladan
bugs1070755
milestone37.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 1070755: Add telemetry for timing PluginAsyncSurrogate::WaitForInit; r=vladan
dom/plugins/ipc/PluginAsyncSurrogate.cpp
toolkit/components/telemetry/Histograms.json
--- a/dom/plugins/ipc/PluginAsyncSurrogate.cpp
+++ b/dom/plugins/ipc/PluginAsyncSurrogate.cpp
@@ -7,16 +7,17 @@
 #include "PluginAsyncSurrogate.h"
 
 #include "base/message_loop.h"
 #include "base/message_pump_default.h"
 #include "mozilla/dom/ContentChild.h"
 #include "mozilla/plugins/PluginInstanceParent.h"
 #include "mozilla/plugins/PluginModuleParent.h"
 #include "mozilla/plugins/PluginScriptableObjectParent.h"
+#include "mozilla/Telemetry.h"
 #include "nsJSNPRuntime.h"
 #include "nsNPAPIPlugin.h"
 #include "nsNPAPIPluginInstance.h"
 #include "nsNPAPIPluginStreamListener.h"
 #include "nsPluginInstanceOwner.h"
 #include "nsPluginStreamListenerPeer.h"
 #include "npruntime.h"
 #include "nsThreadUtils.h"
@@ -405,16 +406,18 @@ bool
 PluginAsyncSurrogate::WaitForInit()
 {
   if (mInitCancelled) {
     return false;
   }
   if (mAcceptCalls) {
     return true;
   }
+  Telemetry::AutoTimer<Telemetry::BLOCKED_ON_PLUGINASYNCSURROGATE_WAITFORINIT_MS>
+    timer(mParent->GetHistogramKey());
   bool result = false;
   MOZ_ASSERT(mParent);
   if (mParent->IsChrome()) {
     PluginProcessParent* process = static_cast<PluginModuleChromeParent*>(mParent)->Process();
     MOZ_ASSERT(process);
     process->SetCallRunnableImmediately(true);
     if (!process->WaitUntilConnected()) {
       return false;
--- a/toolkit/components/telemetry/Histograms.json
+++ b/toolkit/components/telemetry/Histograms.json
@@ -7024,16 +7024,25 @@
     "expires_in_version": "40",
     "kind": "exponential",
     "high": "10000",
     "n_buckets": 20,
     "extended_statistics_ok": true,
     "keyed": true,
     "description": "Time (ms) that the main thread has been blocked on NPP_NewStream in an IPC plugin"
   },
+  "BLOCKED_ON_PLUGINASYNCSURROGATE_WAITFORINIT_MS": {
+    "expires_in_version": "40",
+    "kind": "exponential",
+    "high": "10000",
+    "n_buckets": 20,
+    "extended_statistics_ok": true,
+    "keyed": true,
+    "description": "Time (ms) that the main thread has been blocked on PluginAsyncSurrogate::WaitForInit in an IPC plugin"
+  },
   "BLOCKED_ON_PLUGIN_INSTANCE_DESTROY_MS": {
     "expires_in_version": "40",
     "kind": "exponential",
     "high": "10000",
     "n_buckets": 20,
     "extended_statistics_ok": true,
     "keyed": true,
     "description": "Time (ms) that the main thread has been blocked on NPP_Destroy in an IPC plugin"