зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1011136 - Add a histogram for plugin startup duration. r=bsmedberg
This commit is contained in:
Родитель
742337c540
Коммит
c7bdbdf53f
|
@ -719,10 +719,10 @@ void nsPluginHost::OnPluginInstanceDestroyed(nsPluginTag* aPluginTag)
|
|||
// Another reason not to unload immediately is that loading is expensive,
|
||||
// and it is better to leave popular plugins loaded.
|
||||
//
|
||||
// Our default behavior is to try to unload a plugin three minutes after
|
||||
// its last instance is destroyed. This seems like a reasonable compromise
|
||||
// that allows us to reclaim memory while allowing short state retention
|
||||
// and avoid perf hits for loading popular plugins.
|
||||
// Our default behavior is to try to unload a plugin after a pref-controlled
|
||||
// delay once its last instance is destroyed. This seems like a reasonable
|
||||
// compromise that allows us to reclaim memory while allowing short state
|
||||
// retention and avoid perf hits for loading popular plugins.
|
||||
if (!hasInstance) {
|
||||
if (UnloadPluginsASAP()) {
|
||||
aPluginTag->TryUnloadPlugin(false);
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
|
||||
#include "mozilla/ipc/BrowserProcessSubThread.h"
|
||||
#include "mozilla/plugins/PluginMessageUtils.h"
|
||||
#include "mozilla/Telemetry.h"
|
||||
|
||||
using std::vector;
|
||||
using std::string;
|
||||
|
@ -75,6 +76,7 @@ PluginProcessParent::Launch(int32_t timeoutMs)
|
|||
|
||||
vector<string> args;
|
||||
args.push_back(MungePluginDsoPath(mPluginFilePath));
|
||||
Telemetry::AutoTimer<Telemetry::PLUGIN_STARTUP_MS> timer;
|
||||
return SyncLaunch(args, timeoutMs, selectedArchitecture);
|
||||
}
|
||||
|
||||
|
|
|
@ -2328,6 +2328,14 @@
|
|||
"n_buckets": 20,
|
||||
"description": "Time spent loading plugin DLL and obtaining metadata (ms)"
|
||||
},
|
||||
"PLUGIN_STARTUP_MS": {
|
||||
"expires_in_version": "never",
|
||||
"kind": "exponential",
|
||||
"high": "5000",
|
||||
"n_buckets": 20,
|
||||
"extended_statistics_ok": true,
|
||||
"description": "Time spent starting up plugins (ms)"
|
||||
},
|
||||
"PLUGIN_SHUTDOWN_MS": {
|
||||
"expires_in_version": "never",
|
||||
"kind": "exponential",
|
||||
|
|
Загрузка…
Ссылка в новой задаче