Bug 1070755: Fix invalid key for module init histogram; r=vladan
This commit is contained in:
@@ -1404,14 +1404,6 @@ PluginModuleParent::NP_Initialize(NPNetscapeFuncs* bFuncs, NPPluginFuncs* pFuncs
|
|||||||
}
|
}
|
||||||
TimeStamp callNpInitEnd = TimeStamp::Now();
|
TimeStamp callNpInitEnd = TimeStamp::Now();
|
||||||
mTimeBlocked += (callNpInitEnd - callNpInitStart);
|
mTimeBlocked += (callNpInitEnd - callNpInitStart);
|
||||||
/** mTimeBlocked measures the time that the main thread has been blocked
|
|
||||||
* on plugin module initialization. As implemented, this is the sum of
|
|
||||||
* plugin-container launch + NP_Initialize
|
|
||||||
*/
|
|
||||||
Telemetry::Accumulate(Telemetry::BLOCKED_ON_PLUGIN_MODULE_INIT_MS,
|
|
||||||
GetHistogramKey(),
|
|
||||||
static_cast<uint32_t>(mTimeBlocked.ToMilliseconds()));
|
|
||||||
mTimeBlocked = TimeDuration();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
SetPluginFuncs(pFuncs);
|
SetPluginFuncs(pFuncs);
|
||||||
@@ -1472,17 +1464,6 @@ PluginModuleChromeParent::NP_Initialize(NPNetscapeFuncs* bFuncs, NPError* error)
|
|||||||
InitializeInjector();
|
InitializeInjector();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/** This Accumulate must be placed below the call to InitializeInjector()
|
|
||||||
* because mTimeBlocked is modified in that function.
|
|
||||||
* mTimeBlocked measures the time that the main thread has been blocked
|
|
||||||
* on plugin module initialization. As implemented, this is the sum of
|
|
||||||
* plugin-container launch + toolhelp32 snapshot + NP_Initialize
|
|
||||||
*/
|
|
||||||
Telemetry::Accumulate(Telemetry::BLOCKED_ON_PLUGIN_MODULE_INIT_MS,
|
|
||||||
GetHistogramKey(),
|
|
||||||
static_cast<uint32_t>(mTimeBlocked.ToMilliseconds()));
|
|
||||||
mTimeBlocked = TimeDuration();
|
|
||||||
|
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -1574,6 +1555,16 @@ PluginModuleParent::NPP_New(NPMIMEType pluginType, NPP instance,
|
|||||||
|
|
||||||
if (mPluginName.IsEmpty()) {
|
if (mPluginName.IsEmpty()) {
|
||||||
GetPluginDetails(mPluginName, mPluginVersion);
|
GetPluginDetails(mPluginName, mPluginVersion);
|
||||||
|
/** mTimeBlocked measures the time that the main thread has been blocked
|
||||||
|
* on plugin module initialization. As implemented, this is the sum of
|
||||||
|
* plugin-container launch + toolhelp32 snapshot + NP_Initialize.
|
||||||
|
* We don't accumulate its value until here because the plugin info
|
||||||
|
* is not available until *after* NP_Initialize.
|
||||||
|
*/
|
||||||
|
Telemetry::Accumulate(Telemetry::BLOCKED_ON_PLUGIN_MODULE_INIT_MS,
|
||||||
|
GetHistogramKey(),
|
||||||
|
static_cast<uint32_t>(mTimeBlocked.ToMilliseconds()));
|
||||||
|
mTimeBlocked = TimeDuration();
|
||||||
}
|
}
|
||||||
|
|
||||||
// create the instance on the other side
|
// create the instance on the other side
|
||||||
|
|||||||
Reference in New Issue
Block a user